Problem/Motivation
At the moment it is possible to end up in an infinite loop which causes a PHP memory exhaustion simply by selecting the wrong Destination Field. For example, if you have an inherited Description field, that field appears in the list of Destination Fields within the Description field inheritance configuration.
You therefore could use the Destination field as part of the inheritance to generate the Destination field... infinite loop.
Proposed resolution
Remove the current inherited field from the list of Destination fields.
And it might be worth checking there are no circular dependencies too. Field A has Field B as Destination Field, and Field B has Field A as Destination Field.
Issue fork field_inheritance-3238651
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:
Comments
Comment #4
owenbush commentedI have created an MR which resolves 2 things:
1. The current inherited field cannot be used as the destination field as that creates a circular dependency.
2. The default plugin is now only set once a source field is set, and will select the most relevant plugin rather than the default.
This patch can be used to test.
https://git.drupalcode.org/project/field_inheritance/-/merge_requests/1....
Comment #5
hot_sauce commentedThank you owenbush, the new error checking appears to be working correctly as far as I can tell.
Comment #6
owenbush commentedConfirmed reviewed & tested by hotsaucedesign
Comment #9
owenbush commentedThis has now been fixed, thanks to hotsaucedesign for the find and help testing.