Support

Home Forums Event Espresso Premium Changing EE4 Event Slug to match previous CPT slug?

Changing EE4 Event Slug to match previous CPT slug?

Posted: July 29, 2015 at 12:21 pm


Eric Amundson

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
“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?

Any insight would be great.
Thanks!


Lorenzo Orlando Caum

  • Support Staff

July 29, 2015 at 12:35 pm

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?


Lorenzo


Eric Amundson

July 29, 2015 at 1:18 pm

Hey Lorenzo,

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!


Josh

  • Support Staff

July 29, 2015 at 5:41 pm

Re:

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.

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.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 4 years, 2 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!