[
http://jira.magnolia-cms.com/browse/MAGNOLIA-643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Haderka updated MAGNOLIA-643:
---------------------------------
Fix Version/s: 2.1.5
> cms:publicOnly showInPreview=true throws ClassCastException
> -----------------------------------------------------------
>
> Key: MAGNOLIA-643
> URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-643
> Project: Magnolia
> Issue Type: Bug
> Security Level: Public
> Components: taglibs
> Affects Versions: 2.1.4
> Reporter: Andreas Brenk
> Assignee: Boris Kraft
> Priority: Major
> Fix For: 2.1.5
>
> Attachments: PublicOnly.patch
>
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> The cms:publicOnly tag does not work as documented. If showInPreview is set
> to true it nevertheless does not evaluate its body content on an admin
> instance in preview mode.
> The guilty lines are
> String prev = (String) request.getSession().getAttribute("mgnlPreview");
> //$NON-NLS-1$
> if (!Server.isAdmin() || (prev != null && showInPreview)) {
> in PublicOnly#condition(). The session attribute "mgnlPreview" is a Boolean
> and not a String so a ClassCastException occurs.
> The corrected lines should read
> if (!Server.isAdmin() || (showInPreview && Resource.showPreview(request))) {
--
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]>
----------------------------------------------------------------