[MGNLSTK-734] RedirectTemplateModel should use MagnoliaTemplatingUtilities.createLink() to build redirect URL Created: 09/Jan/11  Updated: 19/Jan/11  Resolved: 13/Jan/11

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: templates
Affects Version/s: 1.3.5
Fix Version/s: 1.4.2

Type: Improvement Priority: Neutral
Reporter: Brad Kazazes Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: redirect, templates
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File RedirectTemplateModel.java.patch    
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

info.magnolia.module.templatingkit.templates.RedirectTemplateModel should be updated to use MagnoliaTemplatingUtilities.createLink() to build the redirect URL for two reason:

1. It should be identical to how the redirect.ftl template builds it for display
2. Currently the URL is built without the ".html" extension. While this may still work in many cases, it actually causes problems with Blossom paragraphs where they are not loaded properly.



 Comments   
Comment by Tobias Mattsson [ 10/Jan/11 ]

Could you give me some more details on the problem you're seeing with blossom paragraphs? From your description it sound like pages don't render correctly unless they're accessed with a .html extension? Is this correct? Is there anything in the logs? A stacktrace would be very helpful.

Comment by Brad Kazazes [ 10/Jan/11 ]

Apologies, but after trying to reproduce the problem again, I've just found out that there was no problem displaying the Blossom paragraph. The problem was due to the page caching afer I initially forgot to add the info.magnolia.module.blossom.view.UuidRedirectViewResolver to the configuration (hence a blank section where the blossom paragraph should have been - which was then cached).

As part of the caching strategy for my site, I have removed all caching from pages ending with ".html" as every page contains personal information. As the redirection process removed the ".html" it continuely used a cached copy of the page, which I didn't count on. I suppose this is just a difference reason why the redirect URL should still include the full path extension

Generated at Mon Feb 12 07:29:54 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.