Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a huge issue (haven't been able to verify 2.x, but tested simplytest.me on 2.0-alpha).
If you have a SEO field on a content type, and then add a menu link (i.e. main navigation), for everytime the ajax is fired on the SEO field, a menu link is created, regardless of the node ever being saved or not.
Comment | File | Size | Author |
---|---|---|---|
#3 | ajax-submit-2969403-3.patch | 664 bytes | b_sharpe |
|
Comments
Comment #2
KingdutchI'm moving this to 8.x-2.x-dev because I know it hasn't been fixed (or discovered) since the last alpha release.
Thanks for the detailed bug report (and the nice GIF). We'll need to figure this out before we release as this can potentially break sites for visitors.
Comment #3
b_sharpe CreditAttribution: b_sharpe commentedIt appears this is from the
$form['#entity_builders']
callbacks being called on validate/submit of content entities. Most of them account for a non-save; however, some rely on the entity being set as validated or not.The following patch should fix that and in turn prevents the menu additions in the above issue.
Comment #4
b_sharpe CreditAttribution: b_sharpe commentedComment #5
KingdutchPatch looks good, comment is clear! I don't have any time to test this at the moment so I'm leaving this for "Needs review" until I do.
If someone can test with and without the patch before I have time I'd be happy to commit this and create a new release :)
Comment #7
KingdutchJust tested the fix locally and it works as expected.
Thanks for your contribution! The fix has been committed and will be included in the next release : )
Comment #9
iampumaThanks had to search a while for why this was happening. works.
Comment #10
Kingdutch