Home › Forums › Calendar Products › Events Calendar PRO › Disabling Slug Warning in 4.0
- This topic has 2 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
December 7, 2015 at 7:32 am #1036877
Allen Presher
ParticipantGreetings,
The Events Calendar has the unfortunately frustrating behavior of displaying an error notice if you have a page that matches the slug of the Calendar. For many reasons it can be desirable to have that page for end users (e.g. so they can hit “Edit Page”, customize sidebars, etc.). The warning is as follows given a page and calendar slug of “calendar”:
The page "Calendar" uses the "/calendar" slug: the Events Calendar plugin will show its calendar in place of the page. Edit the page slug or edit Events settings.Up until 4.0 the previous code was the recommendation on how to remove this warning:
if ( class_exists( 'Tribe__Events__Admin__Notice__Archive_Slug_Conflict' ) ) { remove_action( 'admin_init', array( Tribe__Events__Admin__Notice__Archive_Slug_Conflict::instance(), 'maybe_add_admin_notice' ) ); }The above method no longer works as of 4.0 to disable this undesirable warning that is confusing our users. Please let us know what the new preferred method is for handling this.
In the future an option within The Events Calendar would be great, were this to be implemented as a Setting we would not need to go back into past sites to change this for the now second time. Thank you.
December 7, 2015 at 10:17 am #1037011George
ParticipantHey there,
I’m sorry you’ve found this frustrating! However, we will not include an easy way to disable this because having a page with the same slug as the events calendar slug will break functionality of The Events Calendar on the site.
If your site has not had any issues caused by this slug conflict, then that is a rarity – it’s not a problem, and if you want to keep using the slug of the page there, then that is fine. But the warning is there specifically to be annoying, to urge people to make the simple change and prevent things on their site breaking.
I’m genuinely sorry about the frustration caused by it – and if you really, truly need to keep the page in place with that same slug, then by all means please keep doing so! 😀 And just try adding this new code to your theme’s functions.php file instead to turn that notice off:
if ( class_exists( 'Tribe__Admin__Notice__Archive_Slug_Conflict' ) ) {
remove_action( 'admin_init', array( Tribe__Admin__Notice__Archive_Slug_Conflict::instance(), 'maybe_add_admin_notice' ) );
}
It’s basically the same code as the original, just with a different Class Name now.
I hope this helps!
— George
February 18, 2016 at 8:32 am #1075983Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Disabling Slug Warning in 4.0’ is closed to new replies.
