Repository: tastyigniter/TastyIgniter (language: php)

Issue:
[Bug]: TI.3.4.1 Exception thrown when clicking "New Option" while editing item.
### What happened?

I was having problems when installing from the quick-setup files(although I've never had problems with that before, at least 20+ installations without issue. the last one was over 6 months ago though).

TI 3.4.1 via composer
PHP 7.4.29
MySQL 5.7.38

In case it's relevant, I manually fixed Extensions_model.php from this commit because I also had the same issue. Maybe I need to do all of them?
https://github.com/tastyigniter/TastyIgniter/issues/964

The issue happens when going to Restaurant->Menu Items->(Edit any menu item)->Options->+ New Option
It displays the error and the page itself doesn't change, load the form, etc.
![image](https://user-images.githubusercontent.com/53560104/168825655-f3a70e4d-ff65-4f50-8201-4d51fe001d95.png)


**Side-note
Is there a way to do a clean installation with composer, specifying the exact versions of the core, extensions, etc? I have 2 "Production" TI sites but I also have about 10-15 other ones setup previously from when I was testing various things. Anyways, it'd be nice if I could go look at my most stable installation, take note of the exact versions of the core, each extension, theme, etc. then do a clean composer install that mirrors it.

Since many of us have different environments, we're likely going to have different collections of "most stable" versions but this could help us stay stable based on our environments. I also don't know much so this could be un-needed or a bad idea.

Thanks in advance for you help.

### What did you expect to happen?

That it would work.

### Version

Other (please detail)

### What browser are you seeing the problem on?

Chrome

### Relevant log output

```shell
Exception: Model 'Admin\Models\Menu_options_model' does not contain a definition for 'allergens'.
in /home/oncgadm/public_html/app/admin/formwidgets/Relation.php:215
Stack trace:
#0 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(136): Admin\FormWidgets\Relation->getRelationObject()
#1 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php(106): Admin\FormWidgets\Relation->Admin\FormWidgets\{closure}()
#2 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(193): Illuminate\Database\Eloquent\Relations\Relation::noConstraints(Object(Closure))
#3 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(110): Admin\FormWidgets\Relation->makeFormField()
#4 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(86): Admin\FormWidgets\Relation->prepareVars()
#5 /home/oncgadm/public_html/storage/framework/views/e472bf0ee51dc9f52d1fd5680d2cbf4765a4f557.php(1): Admin\FormWidgets\Relation->render()
#6 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#7 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#8 /home/oncgadm/public_html/app/admin/widgets/Form.php(268): Admin\Classes\BaseWidget->makePartial('form/field_widg...', Array)
#9 /home/oncgadm/public_html/storage/framework/views/bb06c88172228da4c846a57cc16a13ef60d39fc2.php(35): Admin\Widgets\Form->renderFieldElement(Object(Admin\Classes\FormField))
#10 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#11 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#12 /home/oncgadm/public_html/storage/framework/views/fe74bbc98b884da9083b1685003b954e042b9fc8.php(65): Admin\Classes\BaseWidget->makePartial('repeater/repeat...', Array)
#13 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#14 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#15 /home/oncgadm/public_html/app/admin/formwidgets/Repeater.php(97): Admin\Classes\BaseWidget->makePartial('repeater/repeat...')
#16 /home/oncgadm/public_html/storage/framework/views/e472bf0ee51dc9f52d1fd5680d2cbf4765a4f557.php(1): Admin\FormWidgets\Repeater->render()
#17 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#18 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#19 /home/oncgadm/public_html/app/admin/widgets/Form.php(268): Admin\Classes\BaseWidget->makePartial('form/field_widg...', Array)
#20 /home/oncgadm/public_html/storage/framework/views/e93c7175780c4937b95c34296c39e3fb736a3bdb.php(16): Admin\Widgets\Form->renderFieldElement(Object(Admin\Classes\FormField))
#21 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#22 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#23 /home/oncgadm/public_html/storage/framework/views/e90c47515d292e34b8a566f08ac52ec01f35b267.php(10): Admin\Classes\BaseWidget->makePartial('form/field', Array)
#24 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#25 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#26 /home/oncgadm/public_html/app/admin/widgets/Form.php(252): Admin\Classes\BaseWidget->makePartial('form/field_cont...', Array)
#27 /home/oncgadm/public_html/storage/framework/views/8bb7e6c67a39d961d7afb31fc97b3f65e0f338eb.php(19): Admin\Widgets\Form->renderField(Object(Admin\Classes\FormField))
#28 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#29 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#30 /home/oncgadm/public_html/app/admin/formwidgets/RecordEditor.php(112): Admin\Classes\BaseWidget->makePartial('recordeditor/fo...', Array)
#31 [internal function]: Admin\FormWidgets\RecordEditor->onLoadRecord('edit', '2')
#32 /home/oncgadm/public_html/app/admin/classes/AdminController.php(469): call_user_func_array(Array, Array)
#33 /home/oncgadm/public_html/app/admin/classes/AdminController.php(339): Admin\Classes\AdminController->runHandler('formOptions::on...', Array)
#34 /home/oncgadm/public_html/app/admin/classes/AdminController.php(218): Admin\Classes\AdminController->processHandlers()
#35 /home/oncgadm/public_html/app/system/classes/Controller.php(117): Admin\Classes\AdminController->remap('edit', Array)
#36 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): System\Classes\Controller->runAdmin('menus/edit/2')
#37 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('runAdmin', Array)
#38 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(System\Classes\Controller), 'runAdmin')
#39 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#40 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#41 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#42 /home/oncgadm/public_html/app/admin/middleware/LogUserLastSeen.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Admin\Middleware\LogUserLastSeen->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Translation/Middleware/Localization.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Igniter\Flame\Translation\Middleware\Localization->handle(Object(Illuminate\Http\Request), Object(Closure))
#46 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#52 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#57 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#58 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#59 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#60 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#61 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Router/CoreRouter.php(22): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#62 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Igniter\Flame\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#63 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#64 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Setting/Middleware/SaveSetting.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Igniter\Flame\Setting\Middleware\SaveSetting->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#67 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle(Object(Illuminate\Http\Request), Object(Closure))
#69 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#70 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#71 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#72 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /home/oncgadm/public_html/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#74 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /home/oncgadm/public_html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#76 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#77 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#78 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#79 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#80 /home/oncgadm/public_html/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#81 {main}
```

[Bug]: TI.3.4.1 Exception thrown when clicking "New Option" while editing item.
### What happened?

I was having problems when installing from the quick-setup files(although I've never had problems with that before, at least 20+ installations without issue. the last one was over 6 months ago though).

TI 3.4.1 via composer
PHP 7.4.29
MySQL 5.7.38

In case it's relevant, I manually fixed Extensions_model.php from this commit because I also had the same issue. Maybe I need to do all of them?
https://github.com/tastyigniter/TastyIgniter/issues/964

The issue happens when going to Restaurant->Menu Items->(Edit any menu item)->Options->+ New Option
It displays the error and the page itself doesn't change, load the form, etc.
![image](https://user-images.githubusercontent.com/53560104/168825655-f3a70e4d-ff65-4f50-8201-4d51fe001d95.png)


**Side-note
Is there a way to do a clean installation with composer, specifying the exact versions of the core, extensions, etc? I have 2 "Production" TI sites but I also have about 10-15 other ones setup previously from when I was testing various things. Anyways, it'd be nice if I could go look at my most stable installation, take note of the exact versions of the core, each extension, theme, etc. then do a clean composer install that mirrors it.

Since many of us have different environments, we're likely going to have different collections of "most stable" versions but this could help us stay stable based on our environments. I also don't know much so this could be un-needed or a bad idea.

Thanks in advance for you help.

### What did you expect to happen?

That it would work.

### Version

Other (please detail)

### What browser are you seeing the problem on?

Chrome

### Relevant log output

```shell
Exception: Model 'Admin\Models\Menu_options_model' does not contain a definition for 'allergens'.
in /home/oncgadm/public_html/app/admin/formwidgets/Relation.php:215
Stack trace:
#0 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(136): Admin\FormWidgets\Relation->getRelationObject()
#1 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/Relation.php(106): Admin\FormWidgets\Relation->Admin\FormWidgets\{closure}()
#2 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(193): Illuminate\Database\Eloquent\Relations\Relation::noConstraints(Object(Closure))
#3 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(110): Admin\FormWidgets\Relation->makeFormField()
#4 /home/oncgadm/public_html/app/admin/formwidgets/Relation.php(86): Admin\FormWidgets\Relation->prepareVars()
#5 /home/oncgadm/public_html/storage/framework/views/e472bf0ee51dc9f52d1fd5680d2cbf4765a4f557.php(1): Admin\FormWidgets\Relation->render()
#6 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#7 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#8 /home/oncgadm/public_html/app/admin/widgets/Form.php(268): Admin\Classes\BaseWidget->makePartial('form/field_widg...', Array)
#9 /home/oncgadm/public_html/storage/framework/views/bb06c88172228da4c846a57cc16a13ef60d39fc2.php(35): Admin\Widgets\Form->renderFieldElement(Object(Admin\Classes\FormField))
#10 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#11 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#12 /home/oncgadm/public_html/storage/framework/views/fe74bbc98b884da9083b1685003b954e042b9fc8.php(65): Admin\Classes\BaseWidget->makePartial('repeater/repeat...', Array)
#13 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#14 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#15 /home/oncgadm/public_html/app/admin/formwidgets/Repeater.php(97): Admin\Classes\BaseWidget->makePartial('repeater/repeat...')
#16 /home/oncgadm/public_html/storage/framework/views/e472bf0ee51dc9f52d1fd5680d2cbf4765a4f557.php(1): Admin\FormWidgets\Repeater->render()
#17 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#18 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#19 /home/oncgadm/public_html/app/admin/widgets/Form.php(268): Admin\Classes\BaseWidget->makePartial('form/field_widg...', Array)
#20 /home/oncgadm/public_html/storage/framework/views/e93c7175780c4937b95c34296c39e3fb736a3bdb.php(16): Admin\Widgets\Form->renderFieldElement(Object(Admin\Classes\FormField))
#21 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#22 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#23 /home/oncgadm/public_html/storage/framework/views/e90c47515d292e34b8a566f08ac52ec01f35b267.php(10): Admin\Classes\BaseWidget->makePartial('form/field', Array)
#24 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#25 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#26 /home/oncgadm/public_html/app/admin/widgets/Form.php(252): Admin\Classes\BaseWidget->makePartial('form/field_cont...', Array)
#27 /home/oncgadm/public_html/storage/framework/views/8bb7e6c67a39d961d7afb31fc97b3f65e0f338eb.php(19): Admin\Widgets\Form->renderField(Object(Admin\Classes\FormField))
#28 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(225): include('/home/oncgadm/p...')
#29 /home/oncgadm/public_html/app/system/traits/ViewMaker.php(187): Admin\Classes\BaseWidget->makeFileContent('/home/oncgadm/p...', Array)
#30 /home/oncgadm/public_html/app/admin/formwidgets/RecordEditor.php(112): Admin\Classes\BaseWidget->makePartial('recordeditor/fo...', Array)
#31 [internal function]: Admin\FormWidgets\RecordEditor->onLoadRecord('edit', '2')
#32 /home/oncgadm/public_html/app/admin/classes/AdminController.php(469): call_user_func_array(Array, Array)
#33 /home/oncgadm/public_html/app/admin/classes/AdminController.php(339): Admin\Classes\AdminController->runHandler('formOptions::on...', Array)
#34 /home/oncgadm/public_html/app/admin/classes/AdminController.php(218): Admin\Classes\AdminController->processHandlers()
#35 /home/oncgadm/public_html/app/system/classes/Controller.php(117): Admin\Classes\AdminController->remap('edit', Array)
#36 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): System\Classes\Controller->runAdmin('menus/edit/2')
#37 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\Routing\Controller->callAction('runAdmin', Array)
#38 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(262): Illuminate\Routing\ControllerDispatcher->dispatch(Object(Illuminate\Routing\Route), Object(System\Classes\Controller), 'runAdmin')
#39 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\Routing\Route->runController()
#40 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(721): Illuminate\Routing\Route->run()
#41 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request))
#42 /home/oncgadm/public_html/app/admin/middleware/LogUserLastSeen.php(26): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#43 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Admin\Middleware\LogUserLastSeen->handle(Object(Illuminate\Http\Request), Object(Closure))
#44 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Translation/Middleware/Localization.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#45 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Igniter\Flame\Translation\Middleware\Localization->handle(Object(Illuminate\Http\Request), Object(Closure))
#46 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#47 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure))
#48 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#49 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#50 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#51 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\Session\Middleware\StartSession->handleStatefulRequest(Object(Illuminate\Http\Request), Object(Illuminate\Session\Store), Object(Closure))
#52 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure))
#53 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#54 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure))
#55 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#56 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure))
#57 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#58 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(723): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#59 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(698): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request))
#60 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(662): Illuminate\Routing\Router->runRoute(Object(Illuminate\Http\Request), Object(Illuminate\Routing\Route))
#61 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Router/CoreRouter.php(22): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
#62 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(167): Igniter\Flame\Router\CoreRouter->dispatch(Object(Illuminate\Http\Request))
#63 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request))
#64 /home/oncgadm/public_html/vendor/tastyigniter/flame/src/Setting/Middleware/SaveSetting.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#65 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Igniter\Flame\Setting\Middleware\SaveSetting->handle(Object(Illuminate\Http\Request), Object(Closure))
#66 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#67 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(Object(Illuminate\Http\Request), Object(Closure))
#68 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\TrimStrings->handle(Object(Illuminate\Http\Request), Object(Closure))
#69 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#70 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(Object(Illuminate\Http\Request), Object(Closure))
#71 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#72 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(Object(Illuminate\Http\Request), Object(Closure))
#73 /home/oncgadm/public_html/vendor/fruitcake/laravel-cors/src/HandleCors.php(38): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#74 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fruitcake\Cors\HandleCors->handle(Object(Illuminate\Http\Request), Object(Closure))
#75 /home/oncgadm/public_html/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#76 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(167): Fideloper\Proxy\TrustProxies->handle(Object(Illuminate\Http\Request), Object(Closure))
#77 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(103): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#78 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(142): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#79 /home/oncgadm/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(111): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#80 /home/oncgadm/public_html/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#81 {main}
```



Discussion / hints:
Thanks for the bug report - very helpful. 

We have been working on making extensions work through composer rather than the previous method. Support for what you suggest is coming soon.
Thanks for the bug report - very helpful. 

We have been working on making extensions work through composer rather than the previous method. Support for what you suggest is coming soon.

Fix patch:
diff --git a/app/admin/models/Menu_options_model.php b/app/admin/models/Menu_options_model.php
index 4caec90ea7..ffb78847eb 100644
--- a/app/admin/models/Menu_options_model.php
+++ b/app/admin/models/Menu_options_model.php
@@ -50,6 +50,7 @@ class Menu_options_model extends Model
             ],
         ],
         'morphToMany' => [
+            'allergens' => ['Admin\Models\Allergens_model', 'name' => 'allergenable'],
             'locations' => ['Admin\Models\Locations_model', 'name' => 'locationable'],
         ],
     ];
@@ -95,6 +96,7 @@ protected function afterSave()
 
     protected function beforeDelete()
     {
+        $this->allergens()->detach();
         $this->locations()->detach();
     }
 
diff --git a/app/admin/models/config/menu_options_model.php b/app/admin/models/config/menu_options_model.php
index fd0e1e17d6..5e7f973614 100644
--- a/app/admin/models/config/menu_options_model.php
+++ b/app/admin/models/config/menu_options_model.php
@@ -18,6 +18,7 @@
     'values' => [
         'label' => 'lang:admin::lang.menu_options.text_tab_values',
         'type' => 'repeater',
+        'valueFrom' => 'option_values',
         'form' => 'menu_option_values_model',
         'sortable' => true,
     ],


Test patch: