[MGNLFORUM-225] Make forum-templates (components) nullpointer-safe Created: 28/Jan/14  Updated: 20/Feb/14  Resolved: 11/Feb/14

Status: Closed
Project: Forum (closed)
Component/s: templates
Affects Version/s: None
Fix Version/s: 3.3

Type: Bug Priority: Critical
Reporter: Christoph Meier Assignee: Christoph Meier
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Bildschirmfoto 2014-01-28 um 11.24.21.png     PNG File Bildschirmfoto 2014-01-28 um 11.24.31.png     PNG File Bildschirmfoto 2014-01-28 um 11.24.43.png    
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When crating a forum, some pages must be created and to those require some special components which must be added.
(see old docu: http://docuold.magnolia-cms.com/modules/forum.html#Step5Createpages)
After clicking save while adding the components, the page gets reloaded and some of required request parameters get lost.
Theses parameters are important to allow the components render appropriately.

  • forumId on the page „thread-list“ and „create new thread“
  • threadId on the page „message“

Mostly ever when viewing this pages in the pagesApp, the req.-params are missing, which leads to an error in the template-script, which shows the yellow freemarker-exception-stack-trace.
This is very irritating for a content-editor!

Fix the freemarker-scripts in a way, that the render doesn’t throw an exception and show a usefull comment why the cpomeponent cannot be rendered properly currently and probably add a link in that comment with a proper URL with thhe required req.-params to properly display the forum-comps.



 Comments   
Comment by Espen Jervidalo [ 05/Feb/14 ]

Make sure you don't leave commented code.

info.magnolia.module.forum.frontend.action.ThreadList
remove //threadList = new ArrayList();

ThreadView
removed
//throw new IllegalStateException("No thread id given");
//i18n.translate("forum.templateMessage.threadView.missingThreadId")

Comment by Mikaël Geljić [ 11/Feb/14 ]

Again, remove those comments in ThreadView:
//throw new IllegalStateException("No thread id given"); (90)
//i18n.translate("forum.templateMessage.threadView.missingThreadId"); (91)
// TODO (104)

Comment by Christoph Meier [ 11/Feb/14 ]

hopefully the comments are removed now :/

Comment by Christoph Meier [ 17/Feb/14 ]

Note: On master-branch, this one is committed against MGNLFORUM-193

Generated at Mon Feb 12 02:01:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.