[MAGNOLIA-1351] PageMVCServlet broken in a way that disallows forwarding to pages. Created: 07/Feb/07  Updated: 23/Jan/13  Resolved: 28/Jun/07

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.5

Type: Bug Priority: Major
Reporter: Chris Miner Assignee: Chris Miner
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File patch.txt     Text File stacktrace.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

The page mvc servlet looks for a page name in the forwarding request info. Judging from the way the freemarker and jsp servlets are written, probably it shouldn't do this. Attached find a patch that permits forwarding to magnolia 'pages'.

Steps to repoduce
1. set up a template with a path to a page (for example /.magnolia/pages/OfferEditorialCard)
2. try to access a path using this template

You get an error in the log. oddly no exception. but you can set a break point
ERROR info.magnolia.module.admininterface.PageMVCServlet PageMVCServlet.java(getHandler:71) 28.06.2007 16:10:22 no page found: []

then you can see the exception trace. see attachment. After looking at the source code for the freemarker and jsp servlets it seems the page name should come from the include path and not the forward path. see patch. one could debate that only the last term should be taken as the path. I think it is a find standard that page names in magnolia have no '/' in them.



 Comments   
Comment by Chris Miner [ 28/Jun/07 ]

I've used the system a while with this change and it hasn't shown any side effects.

Generated at Mon Feb 12 03:26:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.