Weird Output Pattern Behavior
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2010 09:37 PM
Hi there,
I have a Web Form that is associated to a Template. The output pattern for the template is ${name}.${extension} and happens to be HTML. When I create content for the first time, all is well…I get two files in Alfresco: my-content.xml and my-content.html.
The weird thing is, when I update this content (via the Web Form), a 3rd file gets output: my-content.html.html. I haven't seen this behavior before. Help!
Any assistance will be greatly appreciated.
Thanks.
I have a Web Form that is associated to a Template. The output pattern for the template is ${name}.${extension} and happens to be HTML. When I create content for the first time, all is well…I get two files in Alfresco: my-content.xml and my-content.html.
The weird thing is, when I update this content (via the Web Form), a 3rd file gets output: my-content.html.html. I haven't seen this behavior before. Help!
Any assistance will be greatly appreciated.
Thanks.
Labels:
- Labels:
-
Archive
7 REPLIES 7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 01:41 AM
Sounds like you might be naming the content with the extension included, for example when the you open the Web Form you are naming it MyContent.html rather than just MyContent. If you do that, your ${name} variable = MyContent.html and your ${extension} variable = html.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2010 09:29 AM
No, we are not including the file extension in the file name.
However, when you update existing content the extension is part of the name, but only because it was added by Alfresco when the content was first created.
However, when you update existing content the extension is part of the name, but only because it was added by Alfresco when the content was first created.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2010 06:41 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2010 10:14 AM
Fixed! The Jira issue contains the solution
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2010 04:10 PM
Thanks!

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 01:10 PM
I see from the "Jira" issue, that the issue is fixed in 3.4b but not available for download yet.
I don't know how to implement the fix in 3.4a :
Where is the file located?
I don't know how to implement the fix in 3.4a :
To fix it replace line 235 in org.alfresco.web.forms.RenderingEngineTemplateImpl with (for example):
root.put("name", org.springframework.util.StringUtils.stripFilenameExtension(name));
Where is the file located?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 01:40 PM
Found this workaround for the template output:
${name?replace('.xml','')}.${extension}
