Open sudipto68 opened 1 month ago
@sudipto68 This 'scratch_paragraph' concept is not fully fleshed out, I'm afraid, but is/was intended to allow sites with front end modal editing enabled to insert a new paragraph from the front end, even if no paragraphs items are already present. In this case it would need to insert a blank "scratch paragraph" at the insertion point. At a minimum it should be checking that modal administration is activated and the current user has permissions for it, but I'm tempted to just remove this for now and when/if we bring this functionality in, we can do it all at once, cleanly...
There is a function in the paragraph module's paragraphs.field_formatter.inc file like this:
This function adds a dummy value scratch_paragraph in paragraph fields. For this dummy value, we faced an weird issue in our site. We have a paragraph(i.e. Accordion) that is used as a field in page content type. If we create a page and don't create any paragraph, then also the paragraph is having a dummy value in its fields, for that the HTML structure is present in the node.tpl for the paragraph fields and it is showing the design we provided in the paragraph but don't have any value.
I don't know why this function with dummy value is used? Is there any use case for this?