Comments

Charlie ChX Negyesi created an issue. See original summary.

ghost of drupal past’s picture

Issue summary: View changes
StatusFileSize
new3.83 KB
ghost of drupal past’s picture

StatusFileSize
new3.78 KB

Reroll. And yes, paragraphs_contextual_links_alter is weird but it works.

Status: Needs review » Needs work

The last submitted patch, 3: 3158605_3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ghost of drupal past’s picture

Status: Needs work » Needs review

Well yes it needs that IEF patch, nonetheless it needs a review :) Perhaps we should wrap it in a method exists?

berdir’s picture

Status: Needs review » Needs work

This 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.

ghost of drupal past’s picture

Status: Needs work » Needs review
StatusFileSize
new4.97 KB

Sure. 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.

ghost of drupal past’s picture

StatusFileSize
new4.58 KB

Status: Needs review » Needs work

The last submitted patch, 8: 3158605_8.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ghost of drupal past’s picture

Status: Needs work » Needs review
StatusFileSize
new4.56 KB

Poor orphan paragraphs. I guess that's a test artefact but it's easy to code around it, in fact the code becomes shorter.

ghost of drupal past’s picture

StatusFileSize
new4.8 KB

Let's not forget to actually print the contextual link.

thomas.frobieter’s picture

This 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.

ksenzee’s picture

Issue summary: View changes
StatusFileSize
new4.81 KB

Here'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.

ghost of drupal past’s picture

StatusFileSize
new4.61 KB

Rerolled so it applies cleanly.

ksenzee’s picture

StatusFileSize
new5.21 KB

The 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.

ksenzee’s picture

StatusFileSize
new5.22 KB

Same patch as #15, now with fewer PHP warnings!

kopeboy’s picture

is this similar to the paragraphs_edit module?

anybody’s picture

Yes, 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!

anybody’s picture

paragraphs_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.