Back to ProEvents Support

nocio
nocio

Hi, I've recently installed the ProEvents Plugin on October Build 447 (composer installation) and I get the following error when I try to access /backend/radiantweb/proevents:

Error when accessing ProEvents: Configuration used in Backend\Behaviors\FormController must supply a value 'modelClass'.
46  Backend\Classes\ControllerBehavior->makeConfig(…)   ~/modules/backend/behaviors/FormController.php  103
45  Backend\Behaviors\FormController->__construct(…)    ~/vendor/october/rain/src/Extension/ExtendableTrait.php     211
44  Backend\Classes\Controller->extendClassWith(…)  ~/vendor/october/rain/src/Extension/ExtendableTrait.php     93

Any ideas what could cause this issue?

Many thanks

Last updated

support25620
support25620

"try to access"? How are you navigating and what are trying to get to. Just checked locally in my build and do not see this. Clicking on the ProEvents Icon should navigate to /backend/radiantweb/proevents/events not /backend/radiantweb/proevents, so that URL point is strange to me. Can you please explain more the context here?

nocio
nocio

Thanks for your quick reply. Sorry, what I meant is that I get the message for any of the backend controllers, so /backend/radiantweb/proevents/events (when navigating by clicking on the menu icon) and /backend/radiantweb/proevents/generated_dates as well as /backend/radiantweb/proevents/calendars (when typing in the url manually). Maybe something is messed up with my composer installation as I did install a laravel package but other plugins don't seem to have the same error. I'll dig a bit deeper and let you know if I can see what causes the issue.

nocio
nocio

I've found the source of the problem. The config_form.yaml of the controller specifies the model class in snake-case "model-class". The ConfigMaker then raises an exeception as it can't find the required field 'modelClass'. Renaming model-class to modelClass in the controller yamls fixes the problem. I'm not sure why this does not fail on other installations though. Does October allow both camel and snake case?

hauserj22885
hauserj22885

I have the exact same problem as OP. I had to change both config_form.yaml and config_list.yaml for all controllers (calendars, events and generated dates) to get the plugin working.

I am not sure why model-class is used to begin with, but this needs to be changed to camelCase.

LukeTowers
LukeTowers

The author shouldn't be using snake case, but for a quick fix you can revert https://github.com/octobercms/october/commit/639339d55e8e0b893ab6f8cf58757d9a37c8c7bb

LukeTowers
LukeTowers

The author shouldn't be using snake case, but for a quick fix you can revert https://github.com/octobercms/october/commit/639339d55e8e0b893ab6f8cf58757d9a37c8c7bb

ChadStrat
ChadStrat

hmmm. not sure how that happened! correcting and pushing fix.

ChadStrat
ChadStrat

Could one of you please try bleeding edge ProEvents v2.8.0 and let me know for sure if that resolves your issue?

hauserj22885
hauserj22885

@ChadStrat I updated and it did not fix the problem. In fact, I am getting the exact same error. Did you update all files? Cause upon quick inspection it seems to me you only changed the files from controllers\generated_dates, but not controllers\calendars etc. There is snake-case used in all those files.

Edit: Hmm, what exactly did you change? In all of the config files, including controller\events you're still using snake-case everywhere? confused

Last updated

hauserj22885
hauserj22885

It's not enough to change model-class to modelClass in just the single file for generated dates. Everything in all of your .yaml files should be changed to camelCase only. In fact, snake-case was never allowed to be used in yaml files, but before https://github.com/octobercms/october/commit/639339d55e8e0b893ab6f8cf58757d9a37c8c7bb was applied, it was automatically transformed. This behaviour has now been removed, and thus breaks your plugin. Luckily the fix is easy ;-)

ChadStrat
ChadStrat

mmmmm....I am seeing a failure when un-snake casing translation references. I believe this only applies to classes. Can you please provide any specific errors or failed class references?

ChadStrat
ChadStrat

still waiting for confirmation here on this.

hauserj22885
hauserj22885

@ChadStrat

I am not sure what you mean when you say you see errors for translation references. Those are two completely different topics. I am not sure what you expect ME to do here. Go ahead and install the latest october build, add your plugin, and fix your exceptions. All you have to do is fix your snake case references in your config_*.yaml files.

Translations are stored in an array created by you, you can use whatever casing you want, not sure how this pertains to the issue at hand. If you expect people to help you resolve your issues, you have to provide way more info other than "I am seing a failure...".

Luke already posted a link to the file that causes the issue, just look at the changes made there, and you should understand how this impacts your code. Hope this helps!

Psharp
Psharp

ChadStrat said:

Could one of you please try bleeding edge ProEvents v2.8.0 and let me know for sure if that resolves your issue?

My client had this issue to, I can confirm that 2.8.0 fixed the problem for us. Thanks.

Ihor36945
Ihor36945

How to update to 2.8.0? CURRENT VERSION 2.7.6

Psharp
Psharp

Ihor36945 said:

How to update to 2.8.0? CURRENT VERSION 2.7.6

You can enable it to download by changing edgeUpdates to true in config/cms.php

1-17 of 17