Error using CF Picker in a component embedded with data-sly-resource | Community
Skip to main content
gustavolimarey
New Participant
Jul 20, 2022 12:03 AM UTC
Solved

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

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.
AnikaAgAccepted solution
Employee
Jul 21, 2022 6:30 AM UTC

3 replies

Employee
Jul 20, 2022 8:00 AM UTC

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

Translate
gustavolimarey
New Participant
Jul 20, 2022 12:11 PM UTC

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

Translate
AnikaAgAccepted solution
Employee
Jul 21, 2022 6:30 AM UTC