OliveStudio / olivemenus

A powerful menus plugin for Craft CMS built for the need of simplicity and flexibility
MIT License
40 stars 22 forks source link

Custom Menu item will receive an entry child item's ID if saved at same time #19

Closed missmatsuko closed 6 years ago

missmatsuko commented 6 years ago

Steps to reproduce:

  1. Create a Custom Menu item and add it to the menu.
  2. Add an entry item to the menu (e.g. Single, Channel, or Structure).
  3. Drag the entry menu item to become a child item of the Custom Menu item.
  4. Save the menu.
  5. Check the database table craft_olivemenus_items. The Custom Menu item now has a value in entry_id that matches the child item's entry_id.

It seems to work ok if the child is added and saved after the Custom Menu item has been saved.

missmatsuko commented 6 years ago

Did a little investigating and I believe it's likely an error somewhere in MenuItem.js.

When I looked at the headers from the form submission, I see that the individual item-entry-id for the Custom Menu item was fine, but the corresponding value in menu-items-serialized was the same as its child menu item.

alinistrate commented 6 years ago

Thank you for noticing this. We are working on it and I will let you know once it's fixed.

Alin

alinistrate commented 6 years ago

Hello,

We fixed the issue and released a new version of the plugin.

Thank you, Alin