Problem/Motivation
The sql query for the getParent function is "backwards".
The Edit Link has the wrong id in the link.
Steps to reproduce
(if you have existing data that fits the description, you can use that).
You'll need to have layout builder enabled and/or paragraphs.
The Link Magician paragraph and layout builder sub modules should be enabled.
Create a new page (any node w/ paragraph fields and/or layout builder enabled) and include one or more links that Link Magician would update and/or attempt to update.
Run 'tidy' on the new page (replace {NNN} w/ the id; using dry run is optional).
ddev drush link_magician:tidy nodeid --nodeid={NNN} --dry-run=true
On the 'Attention', 'Updated' and 'Skipped' reports, the 'Edit Link' URL for rows that are paragraph/layout builder is incorrect (it's also incorrect on the CSV exports)
Proposed resolution
Fix the query and typo in the CSV export controller ('entity_id' -> 'id')
Testing
In all 3 reports and the CSV exports, on rows that are not nodes (paragraph, layout builder), the 'Edit Link' URL has been corrected.
Issue fork link_magician-3605739
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- fix-incorrect-parent-node
changes, plain diff MR !23
- 3605739-incorrect-parent-node
compare
Comments
Comment #4
jasongose commentedComment #5
mmarsello commentedCode changes look good and the testing steps produced the desired outcomes. Marking "Reviewed & tested by the community".
Comment #6
jasongose commentedComment #8
jasongose commented