ChurchEvents calendar extra issue after PHP7.3 upgrade

I’m using the Church Events calendar (ChurchEventsCalendar Snippet - Church Events Calendar | MODX Documentation) on a website which has been working great for years. After recently upgrading to MODX 2.8.0 and PHP 7.3 the calendar is no longer working as expected.
I downgraded to PHP 7.1 but the calendar is still not working as it was.
In the admin area some of the Formit placeholders are not displaying anything. For instance the calendar names are not displaying in the following select box:

<select name="category_id" id="sel_category_id" >
        [[+fi.category_select]]
  </select>

I’m not sure what to look for do any help appreciated.

Thanks J

(I should preface this comment by mentioning that I never used the “ChurchEventsCalendar” extra and therefore don’t know what I’m talking about.)

It seems to me that the problem is not a newer PHP or MODx version, but a newer version of the extra FormIt.
Please confirm that you get this error in the error log:

[FormIt] Could not find hook "loadDefaults".

ChurchEventsCalendar extends FormIt classes and I believe changes to the way hooks are handled in FormIt make ChurchEventsCalendar now incompatible with it.


To fix the problem you could try this: Add the function load (code below) to the class eventHooks.

public function load($hookName, $fields = [], $errors = [], $customProperties = [])
{
	if ($hookName === 'loadDefaults'){
		return $this->loadDefaults();
	} else if ($hookName === 'saveChurchEvent'){
		return $this->saveChurchEvent();
	} if ($hookName === 'deleteChurchEvent'){
		return $this->deleteChurchEvent();
	} else {
		return parent::load($hookName, $fields, $errors, $customProperties);
	}        
}

Even if this fix should work. The “ChurchEventsCalendar” hasn’t been updated in years, can’t be installed via Package Management anymore and will continue to break. It is probably not a good idea to rely on it anymore.

Thanks so much!
That does seem to have sorted out the issue :+1: :slightly_smiling_face:

I spoke too soon!!
There’s one field that still isn’t displaying the category option which is:

[[+fi.category_select]]

This is the error log and because it’s such an old extra there’s nothing on Github…

[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:22] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:06:42] (ERROR in modManagerRequest::prepareResponse @ /home/wwwstarn/public_html/core/model/modx/modmanagerrequest.class.php : 187) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace churchevents to the routing based system.
[2021-04-09 09:06:42] (ERROR in modManagerController::render @ /home/wwwstarn/public_html/core/model/modx/modmanagercontroller.class.php : 155) modManagerControllerDeprecated support is deprecated since version 2.2.0. 
[2021-04-09 09:06:43] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/locationtype/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/locationtype/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:06:43] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/location/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/location/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:06:43] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/calendar/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/calendar/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:06:43] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/category/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/category/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:06:54] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/calendar/update with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/calendar/update.php, is deprecated since version 2.7.0. 
[2021-04-09 09:06:54] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/calendar/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/calendar/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:07:09] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modx.class.php : 1031) `` is not a valid integer and may not be passed to makeUrl()
[2021-04-09 09:07:36] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/category/create with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/category/create.php, is deprecated since version 2.7.0. 
[2021-04-09 09:07:36] (ERROR in modProcessor::run @ /home/wwwstarn/public_html/core/model/modx/modprocessor.class.php : 177) Flat file processor support, used for action mgr/category/getList with path /home/wwwstarn/public_html/core/components/churchevents/processors/mgr/category/getlist.php, is deprecated since version 2.7.0. 
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:07:39] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.

I turned off compress_js which appears to got rid of a lot of the above errors and now I have the following:

[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:43] (ERROR @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 541) Could not find snippet with name tinymce.
[2021-04-09 09:32:44] (ERROR in resource 1 @ /home/wwwstarn/public_html/core/model/modx/modparser.class.php : 1373) Bad link tag `[[~40]]` encountered
[2021-04-09 09:33:06] (ERROR in modMenu::getSubMenus @ /home/wwwstarn/public_html/core/model/modx/modmenu.class.php : 148) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace gallery to the routing based system.
[2021-04-09 09:33:06] (ERROR in modMenu::getSubMenus @ /home/wwwstarn/public_html/core/model/modx/modmenu.class.php : 148) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace core to the routing based system.
[2021-04-09 09:33:06] (ERROR in modMenu::getSubMenus @ /home/wwwstarn/public_html/core/model/modx/modmenu.class.php : 148) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace redirector to the routing based system.
[2021-04-09 09:33:06] (ERROR in modMenu::getSubMenus @ /home/wwwstarn/public_html/core/model/modx/modmenu.class.php : 148) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace quip to the routing based system.
[2021-04-09 09:33:06] (ERROR in modMenu::rebuildCache @ /home/wwwstarn/public_html/core/model/modx/modmenu.class.php : 66) modAction support is deprecated since version 2.3.0. Support for modAction has been replaced with routing based on a namespace and action name. Please update the extra with the namespace churchevents to the routing based system.

I realise this extra will possibly be unusable at some point but it’s been working great for 10 years so I’m hoping a fix can be found until I find another calendar option.
Thanks for any help.

There isn’t anything useful in these error logs.

On which view in the frontend are the category options not available? view=add? view=edit?

I don’t think that not using minified javascript does reduce the errors in the log. Maybe instead set log_deprecated to No to get rid of the deprecation warnings.

Hi @halftrainedharry Thanks again for responding :+1:

I have just this second solved it.
It was the [[+category_select]] should have had the fi. prefix, so [[+fi.category_select]] works as expected. I might have accidentally removed it whilst testing.

Thanks again. If you’ve a ‘Buy a Beer’ link I’ll happily contribute.