Menu Lists

Create flexible menus straight from October CMS admin

← Back to Menu Lists Support

Hi, After adding as Menu, I want to add add a menu-item by clicking the 'add item' button on the 'Field'-tab. but this error occurs:

Unable to find configuration file @/plugins/flynsarmy/menu/models/menuitem/fields.yaml defined for Flynsarmy\Menu\FormWidgets\ItemList.

What is the problem?

Best Regards, Leo

The above problem can be resolved by changing "@/plugins/flynsarmy/menu/models/menuitem/fields.yaml" to "$/flynsarmy/menu/models/menuitem/fields.yaml".

Unfortunately, there is a bigger problem. If we save the menu, all the menu items will disappear. After some tracing it is because of the "menu_id" from database table "flynsarmy_menu_menuitems" has been reset to 0. I do not know for what reason.

Still trying to figure out

Both issues should now be fixed. Please update and let me know how it goes.

Thank you for your help. But the second issue is not fixed.

The step to reproduce.

  1. Create a new menu. Say "MyMenu".
  2. Select the "Fields" tab.
  3. Create a menu item for page. Say "MyMenuItem".
  4. At the "Fields" tab, click the "Save and Close" button.
  5. Click the "All Menus" at the left hand side.
  6. Select "MyMenu".
  7. Select the "Fields" tab.
  8. You can see that "MyMenuItem" is NOT there.

If you check the database, "MyMenuItem" is still in the "flynsarmy_menu_menuitems" table. However, its "menu_id" is set to 0 where it should be 1.

I fixed the second problem by doing the following. Is this the right thing to do ?

use Backend\Classes\FormField;

class ItemList extends FormWidgetBase
{
    ....
    public function getSaveValue($value)
    {
        //  The form field should not contribute any save data.
        return FormField::NO_SAVE_DATA;
    }
}

Last updated

kh_october13612 said:

I fixed the second problem by doing the following. Is this the right thing to do ?

use Backend\Classes\FormField;

class ItemList extends FormWidgetBase
{
   ....
   public function getSaveValue($value)
   {
       //  The form field should not contribute any save data.
       return FormField::NO_SAVE_DATA;
   }
}

Thanks a lot! This fixed the problem.

1-6 of 6