there is a case with entityform entities (maybe other entities) that when deleting lets say entityform/8 the function in question will delete the node/8 menu items

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

GiorgosK’s picture

Priority: Normal » Major
Status: Active » Needs review
FileSize
753 bytes

I think its of major importance because one that has enabled other entities (entityform etc) and uses this modules can potentially loose menu link items and not know why this happens

it happened to me for a month already without knowing the cause

here is trivial patch that offers a temporary solution but it might not be the optimal one

Status: Needs review » Needs work

The last submitted patch, 2000926.patch, failed testing.

bforchhammer’s picture

Status: Needs work » Needs review
FileSize
825 bytes

Oh wow, that is a major bug. Fix looks fine (we are only considering node entities anyway). If noone objects, I'll commit the attached patch soon...

bforchhammer’s picture

Title: hook_i18n_menu_entity_translation_delete should check if entity is node before deleting menu links » entity_translation_i18n_menu should check if entity is node before deleting menu links
Status: Needs review » Fixed

Committed and pushed, thanks!

Status: Fixed » Closed (fixed)

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

  • Commit 06b02ba on 7.x-1.x, factory, et-fc, revisions authored by GiorgosK, committed by bforchhammer:
    Issue #2000926 by GiorgosK, bforchhammer: Fixed...

  • Commit 06b02ba on 7.x-1.x, factory, et-fc, revisions, workbench authored by GiorgosK, committed by bforchhammer:
    Issue #2000926 by GiorgosK, bforchhammer: Fixed...