[MGNLUI-2348] Pages with request parameters break in preview mode Created: 04/Nov/13 Updated: 06/Nov/13 Resolved: 04/Nov/13 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.1.2, 5.2 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Tobias Mattsson | Assignee: | Tobias Mattsson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| 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
|
||||||||||||
| Sprint: | 5.1.2 | ||||||||||||
| Description |
|
When a link with request parameters is clicked in the page editor the url is suffixed with ?mgnlChannel=desktop&mgnlPreview=true. It always starts with a question mark. If there's already request parameters present in the url this will fail making ?mgnlChannel=desktop part of the value of the last request parameter already in the url. Steps to reproduce: In firefox:
The reason is that the currentPage parameter sent to the server is: 2?mgnlChannel=desktop The full url is: I believe the problem to be in PageEditorConnetor#init, in this block:
eventBus.addHandler(FrameNavigationEvent.TYPE, new FrameNavigationEventHandler() {
@Override
public void onFrameUrlChanged(FrameNavigationEvent frameUrlChangedEvent) {
final String platformId = getState().parameters.getPlatformType().getId();
final boolean isPreview = getState().parameters.isPreview();
final String queryString = "?mgnlChannel=" + platformId + "&mgnlPreview=" + isPreview;
view.setUrl(frameUrlChangedEvent.getPath() + queryString);
}
});
|