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
Thank you for your help. But the second issue is not fixed.
The step to reproduce.
- Create a new menu. Say "MyMenu".
- Select the "Fields" tab.
- Create a menu item for page. Say "MyMenuItem".
- At the "Fields" tab, click the "Save and Close" button.
- Click the "All Menus" at the left hand side.
- Select "MyMenu".
- Select the "Fields" tab.
- 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