[ 
http://jira.magnolia.info/browse/MAGNOLIA-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Giancarlo Berner updated MAGNOLIA-1983:
---------------------------------------

    Attachment: BaseImageTag.patch

Good to know I am not the only one stumbling over the txt2img tag...

Thanks, Ryan, for pointing out the BaseImageTag class. That made it rather easy 
to find the error. The problem is that TWO nodes are created (the image node 
with the name from the attribute, plus an additional node to store the rendered 
image), but the save happens only on the latter, which does not work because it 
is in "transient" mode.

The attached patch saves the first image node after it's creation and saves the 
second image node (last line: imageNode.getParent().save()) after adding the 
image. 

Yes, the save could be done at the end, by using save() on an ancestor node, 
but if you are in a top hierarchy, you might be running the save on the whole 
web site.

The fix works fine for me now.

> txt2img throws a RepositoryException and does not produce an image result
> -------------------------------------------------------------------------
>
>                 Key: MAGNOLIA-1983
>                 URL: http://jira.magnolia.info/browse/MAGNOLIA-1983
>             Project: Magnolia
>          Issue Type: Bug
>          Components: taglibs
>    Affects Versions: 3.5.2
>         Environment: Mac OS X, Windows XP - Magnolia 3.5.2, JDK 1.6, using 
> Jackrabbit with Derby
>            Reporter: Ryan Gardner
>            Assignee: Fabrizio Giustina
>            Priority: Minor
>         Attachments: BaseImageTag.patch, MAGNOLIA-1983_stacktrace.txt
>
>
> In a jsp template, including the following tag (assuming that cmsu is the 
> prefix assigned to the cms-util taglib...):
>  
> <cmsu:txt2img imageContentNodeName="generatedImages" text="Snowmobile 
> Vermont!" />
> should create a JCR child node of the page called "generatedImages" and put a 
> node under that node containing the generated image.
> An error is thrown. 
> Instead of doing this, however, a RepositoryException is thrown (full 
> stacktrace in attachment)
> Another user on the magnolia-users list confirmed that this error occurred on 
> his system as well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to