Needs review
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jul 2020 at 08:21 UTC
Updated:
27 Apr 2026 at 10:47 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
ghost of drupal pastComment #3
ghost of drupal pastReroll. And yes,
paragraphs_contextual_links_alteris weird but it works.Comment #5
ghost of drupal pastWell yes it needs that IEF patch, nonetheless it needs a review :) Perhaps we should wrap it in a method exists?
Comment #6
berdirThis is interesting, but paragraphs does not depend on IEF in any way, we have our own widgets and that logic will need to be duplicated in paragraphs.
Comment #7
ghost of drupal pastSure. The strings still contain inline_entity_form and ief but it'd be near useless if we change it because then the caller would need to figure out the widget used for every ancestor.
Comment #8
ghost of drupal pastComment #10
ghost of drupal pastPoor orphan paragraphs. I guess that's a test artefact but it's easy to code around it, in fact the code becomes shorter.
Comment #11
ghost of drupal pastLet's not forget to actually print the contextual link.
Comment #12
thomas.frobieterThis would be a very cool feature.
Looks like #11 still - partly - applies with D9, the contextual links are present, but the anchor target ids in the edit form are missing, so it doesn't scroll to the paragraph.
Comment #13
ksenzeeHere's a version of the patch that removes the dependency on IEF and instead makes the contextual links open the newly stable paragraphs widget. Same thing as before, just using the native widget.
>the caller would need to figure out the widget used for every ancestor
This is a problem for anyone trying to generate contextual links to any kind of embedded entity: at link generation time, you don't actually know whether the widget you're trying to open is compatible with the contextual link. With this patch, it'll work if you're using the stable widget, but not if you're using anything else, such as the legacy widget or the IEF-based widget. It fails relatively gracefully, in that it'll open the parent entity form, but not scroll down to the right paragraph or open the form.
> This would be a very cool feature.
It's really slick. We're running it on our own site, and our editors squawked loudly when we broke it with a recent update. They love it.
Note: You do need to be running the latest patch from #2760937: contextual.js produces an undesireable URL when a contextual link has a fragment in it to get this to work.
Comment #14
ghost of drupal pastRerolled so it applies cleanly.
Comment #15
ksenzeeThe patch in #14 runs afoul of https://github.com/symfony/symfony/issues/44432 in D10. This version should fix it in a backwards-compatible way.
Comment #16
ksenzeeSame patch as #15, now with fewer PHP warnings!
Comment #17
kopeboyis this similar to the
paragraphs_editmodule?Comment #18
anybodyYes, I think this is exactly what https://www.drupal.org/project/paragraphs_edit is made for. I'd vote to close this won't fix and instead improve paragraphs_edit to provide the requested functionality. Would be great if you all could help over there, as paragraphs_edit seems not to be very actively maintained and having some flaws.
@berdir if you agree this belongs there, please close won't fix. Thanks!
Comment #19
anybodyparagraphs_edit 4.x has an alpha release now. Should solve this (and more) in contrib. Feel free to close this won't fix, maybe also other related issues.