Posted: July 29, 2015 at 12:21 pm
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
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?
Any insight would be great.
Hi Eric, are you experiencing this issue with the latest version of Event Espresso 4? http://eventespresso.com/wiki/ee4-changelog/
Next, how are you changing the slug?
Are you editing it through the WP dashboard or through one of our sample code snippets?
I am running the latest version (4.7.9.p) and changing the slug via the menu in EE Events->Tempaltes->”Event Slug”
Thanks for the fast response!
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.
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.