[MAGNOLIA-4750] Channel resolver not called on author instance Created: 21/Dec/12  Updated: 23/Jun/14  Resolved: 17/Jan/13

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

Type: Bug Priority: Neutral
Reporter: Jan Christian Haddorp Assignee: Roman Kovařík
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://demopublic.magnolia-cms.com/demo-project/about.html
http://demo.magnolia-cms.com/demo-project/about.html


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
Date of First Response:

 Description   

On the STK demo site a channel resolver is configured. When the public site is loaded on a smartphone a special theme (pop-mobile) is used. This is not working on the author instance.

When debugging it locally it seams the resolver class is used while being in edit mode. In this case further execution is skipped (in this case ok).

DeviceChannelResolver
if(server.isAdmin() && (mgnlPreview == null || "false".equals(mgnlPreview))) {
return UNRESOLVED;
}

But when switching to preview mode nothing happens. The resolver class is not called and no special mobile theme is used.
Is there a reason why channel resolving should only work on public instance or is there a bug?



 Comments   
Comment by Jan Haderka [ 03/Jan/13 ]

The line you quoted seems to be correct, but you should be able to see the special theme in preview mode on author, so it is most likely a bug.
Thanks for your report.

Comment by Roman Kovařík [ 16/Jan/13 ]

When you are in edit mode and you switch to preview, desktop channel is used directly in URL:
http://localhost:8080/magnoliaAuthor/demo-project.html?mgnlIntercept=PREVIEW&mgnlPreview=true&mgnlChannel=desktop
That's the reason why isn't ChannelResolver called (it's called only when mgnlPreview isn't set);
But you can see quick smartphone/tablet preview via Preview-arrow button.

Comment by Jan Christian Haddorp [ 19/Jan/13 ]

Thanks for the update. Is there a way to avoid the appending of mgnlChannel=desktop when clicking preview?
The documentation mentions different ways of channel resolving, e.g. location based.
So, it may happen that different channels are used (not always desktop/smartphone/tablet).

The preview for smartphone/tablet is a great feature. But is there a way to change/update this list?
Maybe just adding some flags making the behavior configurable.

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