Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on a page rendered via controller mapping #164

Closed
alansemenov opened this issue Apr 29, 2024 · 1 comment · Fixed by #165
Closed

Error on a page rendered via controller mapping #164

alansemenov opened this issue Apr 29, 2024 · 1 comment · Fixed by #165
Assignees
Labels

Comments

@alansemenov
Copy link
Member

https://developer.enonic.com/search?q=webapp

If a page is not mapped to an underlying content item but rendered via controller mapping then SEO Metafields will give an error:

Caused by: org.openjdk.nashorn.internal.runtime.ECMAException: TypeError: Cannot get property "_path" of null
	at org.openjdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:212)
	at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:184)
	at org.openjdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:171)
	at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:258)
	at org.openjdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:69)
	at jdk.dynalink/jdk.dynalink.linker.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:109)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.lambda$getGuardedInvocation$0(LinkerServicesImpl.java:137)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getWithLookupInternal(LinkerServicesImpl.java:168)
	at jdk.dynalink/jdk.dynalink.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:135)
	at jdk.dynalink/jdk.dynalink.DynamicLinker.relink(DynamicLinker.java:241)
	at org.openjdk.nashorn.internal.scripts.Script$Recompilation$1043$901AA$add_metadata.L:1#responseProcessor(com.enonic.app.metafields:/site/processors/add-metadata.js:47)
	at org.openjdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:650)
	at org.openjdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
	at org.openjdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:520)
	at org.openjdk.nashorn.api.scripting.ScriptObjectMirror.call(ScriptObjectMirror.java:111)
	at com.enonic.xp.script.impl.value.FunctionScriptValue.call(FunctionScriptValue.java:38)
```
@ComLock
Copy link
Collaborator

ComLock commented Apr 29, 2024

This probably happens because it's a site mapping, and there is no content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants