Error: org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method redirectTarget [Revisit] | Community
Skip to main content
Level 5
June 15, 2023

Error: org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method redirectTarget [Revisit]

  • June 15, 2023
  • 1 reply
  • 1384 views

Hi All,

 

Initially I had an issue of object access issue described in this thread:

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/error-org-apache-sling-scripting-sightly-render-objectmodel/m-p/593530#M39053

 

Basically I created a template with a structure resource located at

/apps/mysite/components/structure/content-detail. I like to have my own customize resourceSuperType, so I copied "core/wcm/components/page/v2" to "/apps/mysite/wcm/components/page/v2", without any changes. Then all pages using content-detail will have "Cannot access" errors when pointing to /apps/mysite/wcm/components/page/v2", as:

 

org.apache.sling.scripting.sightly.render.ObjectModel Cannot access method redirectTarget on object com.adobe.cq.wcm.core.components.internal.models.v1.PageImpl@33ab76ab

 

The file/resource structure:

/apps

   + core

   |

   + mysite

   

content-detail 

     sling:resourceSuperType="core/wcm/components/page/v2/page"  ---> no error message

content-detail

     sling:resourceSuperType="/apps/mysite/wcm/components/page/v2/page" ---> has error message

 

Then I cloned core/wcm/components/page/v2, created a node as v3 under the same directory as core/wcm/components/page/v3, again, it fails

content-detail 

     sling:resourceSuperType="core/wcm/components/page/v3/page"  ---> has error message

 

Anyone has any idea why cloning doesn't work?

 

Thanks!

 

-kt

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Kiran_Vedantam
Community Advisor
Community Advisor
June 15, 2023

Hi @kevin_gta 

 

Can you check if your bundles are active? Also, instead of copying the node altogether, you can proxy the component and refer it to core components page.

 

Thanks,

Kiran Vedantam.

Kevin_GTaAuthor
Level 5
June 16, 2023

Hi @kiran_vedantam 

 

The bundle is active. I did the proxy also, it failed.

 

-kt