Components with areas does not behave as expected on a public instance
----------------------------------------------------------------------
Key: MAGNOLIA-4483
URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-4483
Project: Magnolia
Issue Type: Bug
Security Level: Public
Components: templating
Affects Versions: 4.5.3
Reporter: Samuel Schmitt
Priority: Major
Fix For: 4.5.x
Attachments: Demo Project - About - On public.jpg, jcr-view.jpg,
stkTeaser.jpg
On a public instance, components that have in their configuration areas defined
do not behave as expected while this behavior is correct on the author
instance.
On the public, even if the area is not existing , the component displays it.
Let's take an example.
Open these pages
http://demoauthor.magnolia-cms.com/demo-project/about.html
and
http://demopublic.magnolia-cms.com/demo-project/about.html
Inspect the HTML code of the "Standard Article" on both page.
You will remark that on the public site you have an extra {{div}} where class
is {{links}}.
See the screenshot !Demo Project - About - On public.jpg!.
Standard article is a STK Teaser, its configuration is {{stkTeaser}}.
And you can !see^stkTeaser.jpg! that it has an area {{linkList}}.
And this area has as a temnplate script
{{/templating-kit/components/teasers/linkListArea.ftl}} that renders this HMTL
code
{code}<div class="links">
[#if (content.title)??]
<${headingLevel}>${content.title}</${headingLevel}>
[/#if]
<ul>
[#list components as component ]
[@cms.component content=component /]
[/#list]
[#if cmsfn.editMode]
<li cms:add="bar"></li>
[/#if]
</ul>
</div><!-- end links -->{code}
But why this code is rendered on public and not on author.
By the way you can have a look at the !JCR Browser Website^jcr-view.jpg!, the
content is 100% the same, there is no empty {{linkList}} node on public (that
could lead to the same behavior).
So I think that the problem comes from the tag {{cms.area}}.
In internalPage.ftl
{code} [#-- Rendering the teaser's linkList --]
[@cms.area name="linkList"/]{code}
The tag should not render the area {{linkList}} as it's not existing.
Well it works on the author, but why not on the public?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------