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.

SEO Issue

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

b_sharpe created an issue. See original summary.

Kingdutch’s picture

Version: 8.x-2.0-alpha2 » 8.x-2.x-dev
Issue tags: +Release blocker

I'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.

b_sharpe’s picture

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

b_sharpe’s picture

Status: Active » Needs review
Kingdutch’s picture

Patch 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 :)

  • Kingdutch committed 6c13e6c on 8.x-2.x authored by b_sharpe
    Issue #2969403 by b_sharpe: Submission on nodes causes Multiple menu...
Kingdutch’s picture

Status: Needs review » Fixed

Just 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 : )

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

iampuma’s picture

Thanks had to search a while for why this was happening. works.

Kingdutch’s picture

Issue tags: -Release blocker