Hello,
I want to use the diff module with the Entity share module to provide a mean to see diff between locally imported entity and remote ones.
I will post a WIP patch on entity share in the comment #2856719-14: Diff on entities but it also requires some changes in the diff module.
- In my case a revision user is not existing
- I need to be able to make links to another route
I will post a patch highlighting the changes required.
I can't change the PluginRevisionController::diffRoute() with a service system and override it because otherwise on the client website, the diff module won't be usable in the standard way.
I want to get a discussion with diff's maintainers to see what can be done to have more flexibility in diff if possible.
Maybe the issue can be related to #2784687: Make diff building more modular
Thanks for any reply.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | diff-other_context-WIP-3088227-2.patch | 2.79 KB | grimreaper |
Comments
Comment #2
grimreaperHere is the patch.
Comment #3
grimreaperDowngrading priority has only patch from #3088274: Prevent fatal error if the revision has no author is required or my needs now.
Comment #4
grimreaperHello,
Increasing priority as we have side effect in the Entity share module.
Please see #2856719-28: Diff on entities.
In the case of entity reference fields, if entity ids mismatched, the diff is not meaningful.
Comment #5
harpreet16 commented@Grimreaper the $right_revision created in DiffController.php (line 136) by "$this->jsonapiHelper->extractEntity($entity_data);" does not return any data in "relations" index of the passed array. It simply considers $data['attributes']. Also after that the format is not appropriate so that it can be compared.
Note: Used an image field for this finding. I guess we might need to have a different approach for the same.
Comment #6
heddnFor this to be reviewed and accepted, please review https://git.drupalcode.org/project/diff#contribution-guidelines. Since this is a decidedly old contribution, it likely needs a reroll/rebase. Additionally, we'll need an MR opened and some tests.