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.

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new2.79 KB

Here is the patch.

grimreaper’s picture

Priority: Normal » Minor

Downgrading priority has only patch from #3088274: Prevent fatal error if the revision has no author is required or my needs now.

grimreaper’s picture

Priority: Minor » Normal

Hello,

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.

harpreet16’s picture

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

heddn’s picture

Version: 8.x-1.x-dev » 2.x-dev
Status: Needs review » Needs work

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