I have a client who is moving to EE4 from a previously implemented custom event system that used a CPT. This previous CPT used a slug of ‘event’ and they would like to have EE4 use that same slug. I’ve change the definition of the CPT to use a new slug of old_event. Then after I change EE to use the slug of ‘event’ I get the following error when trying to view event details.
An EE_Error exception was thrown! code: EE_Config – _verify_config_params – 440
“No configuration section has been provided while attempting to save “_Config”.”
click to view backtrace and class/method details
/srv/www/testdomain/htdocs/wp-content/plugins/event-espresso-core-reg/core/EE_Config.core.php ( line no: 440 )
Any insight as to how I could get this to work? I can use the slug of ‘events’ for EE and things work fine. It’s when I try to use the previously used slug of ‘event’ that I have an issue. I’ve tried resetting permaliks and disabling and reenabling EE while resetting permalinks. Is EE somehow getting one of the other CPT events because of the old slug and is trying to render it?
Is EE somehow getting one of the other CPT events because of the old slug and is trying to render it?
No, you’d see the same error if you tried to use ‘event’ as the slug on a fresh installation of WP + EE. I think this may be because ‘event’ is already registered as the ‘singular_slug’ for the espresso_events Custom Post type. You’ll see where it’s set in the get_CPTs() method in /event-espresso-core-reg/core/CPTs/EE_Register_CPTs.core.php.
You could open up a pull request to add a filter to change the singular slug, which would allow you to change the singular slug programmatically.
Viewing 3 reply threads
The support post ‘Changing EE4 Event Slug to match previous CPT slug?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.