Error using CF Picker in a component embedded with data-sly-resource | Community
Skip to main content
gustavolimarey
July 20, 2022
Solved

Error using CF Picker in a component embedded with data-sly-resource

  • July 20, 2022
  • 1 reply
  • 1056 views

Hi everyone,

 

I created a component with the idea of being a content fragment where the dialog can have a field sling:resourceType="dam/cfm/components/cfpicker".

 

When I drop this component on a page, this dialog works correctly, the problem is that when I try to embed it in another component using data-sly-resource, when I open the dialog, I select the path of the content fragment and try to save , I am getting this error.

 

Parent component HTML

<sly data-sly-resource="${'author' @ resourceType='myproject/components/ui/author', decoration='true'}"></sly>

Screen error

 

 Log

 

POST /content/myproject/en/site-prod/blog-test/_jcr_content/root/responsivegrid/blog_header/author HTTP/1.1] org.apache.sling.servlets.post.impl.SlingPostServlet Except ion while handling POST on path [/content/myproject/en/site-prod/blog-test/jcr:content/root/responsivegrid/blog_header/author] with operation [org.apache.sling.servlets.post.impl.operations.ModifyOperation] org.apache.sling.api.resource.PersistenceException: Resource '/content/myproject/en/site-prod/blog-test/jcr:content/root/responsivegrid/blog_header/author' is not modifiable.

 


I found this topic discussing this problem, however, I don't understand how it applies to my problem.
 https://www.albinsblog.com/2016/06/caused-by-orgapacheslingapiresourcepers-resource-is-not-modifiable.html#.YtcvCXbMLYw 

 

Edit 1

How can I solve this problem, I mean I need to use a component that has a dialog with cfpicker field and that component can be embedded in the page using the data-sly-resource? Today my component already works if I drag and drop, but not with data-sly-resource...

Thank you

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

Please see if this help your usecase , https://sourcedcode.com/blog/aem/dynamically-include-an-experience-fragment-in-sightly

 

1 reply

Adobe Employee
July 20, 2022

What is the problem statement you are trying to solve with this? If you can give a summary probably it will be easy to figure out the right way and if at all you need to go this route or not.

 

Thanks

Anika

gustavolimarey
July 20, 2022

Thanks for your point @anikaag  , I edited the comment by inserting this question...

AnikaAgAdobe EmployeeAccepted solution
Adobe Employee
July 21, 2022