This patch changes the assertion used to evaluate if a field should be included in the form.
Proteo → created an issue.
The error is caused by the inexistence of the '#machine_name' => ['exists' => 'EntityClass::method'] array key, which should point to the class method that can be used to ensure that the machine name isn't duplicated.
Attached a patch that fixes the issue.
Yet another confirmation that the patch in the merge request works as intended. Thanks!
Mark, thanks for taking the time to give such a detailed explanation. I think however that this solution apply only to remote videos added using a field of the "Media > Remote video" type. For that it works great! (I tried it).
For actual URL embeds, you can use the patch available here:
Firstly, thanks for this fantastic module. I'm having a related (same?) issue. Once you create a translation, it's not possible to add entities in the original node because translations won't get updated:
1. Create a new node (with an entity reference field using IFE).
2. Add a few references to your field and save the node.
3. Create a translation of the node in a different language. All the references in the field will be there.
4. Add a new reference in the original node and save it.
5. The translated version of the node will not have the new entry, and it will not be possible to add it directly either.
So @ofrommel your'e right, by design the module won't allow you to alter the contents of the field and I think the approach is correct. However, it should at least be kept in sync when adding/removing entries in the original entity?
So far, the only way to work around this problem is to delete the translation and create it again from scratch, which is not always something easy to do.
Updated patch compatible with the 2.0.0-alpha1 version.
Just confirming that the patch applies cleanly, and the functionality it provides works great. Tested on two different sites with Linkit 6.0.0-beta4 and Drupal 9.5.4.