[ 
https://issues.apache.org/jira/browse/OFBIZ-3022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766269#action_12766269
 ] 

Bruno Busco commented on OFBIZ-3022:
------------------------------------

Patrick,
I get an error when trying to look at the HTML of the data resource here:
https://localhost:8443/content/control/EditHtmlText?dataResourceId=CONTENT_ERROR_403

could you please check if this is related to your patch?

The error is:
Expression statusCode is undefined on line 1, column 131 in Thu Oct 15 23:30:34 
CEST 2009. The problematic instruction: ---------- ==> ${statusCode} [on line 
1, column 129 in Thu Oct 15 23:30:34 CEST 2009] in user-directive 
renderTextareaField [on line 1, column 1 in Thu Oct 15 23:30:34 CEST 2009] 
---------- Java backtrace for programmers: ---------- 
freemarker.core.InvalidReferenceException: Expression statusCode is undefined 
on line 1, column 131 in Thu Oct 15 23:30:34 CEST 2009. at 
freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at 
freemarker.core.Expression.getStringValue(Expression.java:118) at 
freemarker.core.Expression.getStringValue(Expression.java:93) at 
freemarker.core.DollarVariable.accept(DollarVariable.java:76) at 
freemarker.core.Environment.visit(Environment.java:209) at 
freemarker.core.MixedContent.accept(MixedContent.java:92) at 
freemarker.core.Environment.visit(Environment.java:209) at 
freemarker.core.Environment.renderElementToString(Environment.java:1568) at 
freemarker.core.StringLiteral.getStringValue(StringLiteral.java:101) at 
freemarker.core.StringLiteral._getAsTemplateModel(StringLiteral.java:86) at 
freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at 
freemark...................


> Addind Error Pages (404 - 410) possibilities for the Content app
> ----------------------------------------------------------------
>
>                 Key: OFBIZ-3022
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3022
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: content
>    Affects Versions: SVN trunk
>            Reporter: Patrick Antivackis
>            Assignee: Bruno Busco
>         Attachments: ContentHttpErrorData.xml, Patch-OFBIZ-3022-824037.txt, 
> Patch-OFBIZ-3022.txt
>
>
> The idea is to allow CMS based sites to have 404 not found, 410 page is gone 
> and 403 Forbidden pages (not yet used).
> For this I first create global error pages  in Data Resources/Content (id = 
> CONTENT_ERROR_xxx). These pages will be catchall Error pages if nothing is 
> defined at the Website Level (see below). Of course, theses pages can be 
> localized through the ContentAssoc ALTERNATE_LOCALE type (see the seed file 
> for example).
> Then I added a ERROR_ROOT type in the WebSiteContentType entity.
> The Document declared as ERROR_ROOT for a CMS Website will become an Error 
> catch-all page for this site.
> Under this root, specific error pages (404, 410) can be added (just one 
> sublevel) in order to have a specific page per error code (status code = 
> mapKey)
> These documents can of course be localized too.
> I then updated the CmsEvent class in order to find a corresponding error page 
> (first look at the subcontent of ERROR_ROOT, or take ERROR_ROOT or take the 
> global CONTENT_ERROR page). Now the rendered content also received the status 
> code in its context, so a $[statusContent} in a ftl template can show the 
> statusCode (200/404/410)
> Also updated the WebSiteCMSNav.ftl and WebSitePublishPoint.groovy in order to 
> show error tree (and may be manage the pages later)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to