[MGNLUI-4095] Pages detail subapp failed when page name is missing Created: 01/Dec/16  Updated: 11/Mar/21  Resolved: 11/Mar/21

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

Type: Bug Priority: Neutral
Reporter: Hieu Nguyen Duc Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File error.png    
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   

+ Go to pages app
+ Open "travel" page, it shows successfully
+ Remove the "travel" part in the URI like this
https://demo.magnolia-cms.com/.magnolia/admincentral#app:pages:detail;/:edit
=> Error shown (see the attached file)

~ Side note: This issue doesn't occur on other apps like Asset and Tours. I expect that it should show Pages's default view or an empty page.



 Comments   
Comment by Mikaël Geljić [ 01/Dec/16 ]

Stack trace is in the pulse at the moment (we'll change that too in the future)

Stack trace: java.lang.NullPointerException
	at info.magnolia.pages.app.editor.PagesJcrContentConnector.getPageTitle(PagesJcrContentConnector.java:162)
	at info.magnolia.pages.app.editor.PagesEditorSubApp.updateCaption(PagesEditorSubApp.java:177)
	at info.magnolia.pages.app.editor.PagesEditorSubApp.start(PagesEditorSubApp.java:200)
	at info.magnolia.pages.app.editor.PagesEditorSubApp.start(PagesEditorSubApp.java:107)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.startSubApp(AppInstanceControllerImpl.java:426)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.openSubApp(AppInstanceControllerImpl.java:382)
	at info.magnolia.ui.framework.app.BaseApp.locationChanged(BaseApp.java:65)
	at info.magnolia.ui.framework.app.AppInstanceControllerImpl.onLocationUpdate(AppInstanceControllerImpl.java:270)
	at info.magnolia.ui.framework.app.AppControllerImpl.doStartIfNotAlreadyRunning(AppControllerImpl.java:253)
	at info.magnolia.ui.framework.app.AppControllerImpl.onLocationChanged(AppControllerImpl.java:339)
	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:64)
	at info.magnolia.ui.api.location.LocationChangedEvent.dispatch(LocationChangedEvent.java:42)
	at info.magnolia.event.SimpleEventBus.fireEvent(SimpleEventBus.java:78)
	at info.magnolia.ui.api.location.LocationController.goToWithoutChecks(LocationController.java:103)
	at info.magnolia.ui.api.location.LocationController.goTo(LocationController.java:97)
	at info.magnolia.ui.api.location.LocationHistoryHandler.handleFragment(LocationHistoryHandler.java:120)
	at info.magnolia.ui.api.location.LocationHistoryHandler.access$100(LocationHistoryHandler.java:49)
	at info.magnolia.ui.api.location.LocationHistoryHandler$1.onFragmentChanged(LocationHistoryHandler.java:79)
	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:55)
	at info.magnolia.ui.api.shell.FragmentChangedEvent.dispatch(FragmentChangedEvent.java:41)
	at info.magnolia.event.EventHandlerCollection.dispatch(EventHandlerCollection.java:72)
	at info.magnolia.ui.framework.shell.ShellImpl$2.onFragmentChanged(ShellImpl.java:130)
	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.notifyOnFragmentChanged(MagnoliaShell.java:260)
	at info.magnolia.ui.framework.shell.ShellImpl.goToApp(ShellImpl.java:262)
	at info.magnolia.ui.framework.shell.ShellImpl.access$500(ShellImpl.java:78)
	at info.magnolia.ui.framework.shell.ShellImpl$2.goToApp(ShellImpl.java:150)
	at info.magnolia.ui.vaadin.magnoliashell.MagnoliaShell.goToApp(MagnoliaShell.java:130)
	at info.magnolia.ui.vaadin.magnoliashell.rpc.MagnoliaShellRpcDelegate.activateApp(MagnoliaShellRpcDelegate.java:68)
	at sun.reflect.GeneratedMethodAccessor783.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:158)
	at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocation(ServerRpcHandler.java:437)
	at com.vaadin.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:408)
	at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:273)
	at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:90)
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:41)
Comment by Mikaël Geljić [ 05/Dec/16 ]

Side note #2: behavior for other content apps is debatable as well:

  • They may open a new detail subapp for creation at the given path
    • that's just how creating item works... by firing a location change (see EditItemAction), no distinction of editing vs. creating on DetailLocation level
  • They may as well open a detail subapp for a different node-type (try to use the assets app and change the location into a folder)
    • EditorDefinition#getNodeType is only used for creation, not for verifying an edited item matches the editor definition
Comment by Roman Kovařík [ 11/Mar/21 ]

Can't reproduce on latest demo.

Generated at Mon Feb 12 09:13:13 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.