Support

Home Forums Event Espresso Premium Split: The requested page route does not exist for the Event Venues admin page

Split: The requested page route does not exist for the Event Venues admin page

Posted: May 29, 2018 at 8:55 am


radiusinvestigations

May 29, 2018 at 8:55 am

I have the same issue. The requested page route does not exist for the Event Venues admin page. EE_Admin_Page - _verify_routes - 835

Venue pages only show in draft mode, but when published, page receive a 404 error.


Josh

  • Support Staff

May 29, 2018 at 9:22 am

Hi there,

This is actually a different issue so I’ve split your reply into a new topic.

Can you post a link to a page on your site that has an event that has a venue assigned to it? We’ll be able to investigate further if we can view that page.


radiusinvestigations

May 29, 2018 at 9:25 am

https://site3733444.nestifysites.com/facilities/bsi-long-island-training-center/


radiusinvestigations

May 29, 2018 at 9:27 am

Sorry, just misread your post. The venue information does show on an event, just not on the venue page. https://site3733444.nestifysites.com/events/test-event/


Josh

  • Support Staff

May 29, 2018 at 9:29 am

May I ask how was the base URL for venues changed to facilities? Was that changed using some custom code?


radiusinvestigations

May 29, 2018 at 9:30 am

Yes, it was changed with code found in these forums, placed in the theme functions file:

<?php
	add_filter( 'gettext', 'ee_venue_filter_gettext', 10, 3 );
function ee_venue_filter_gettext( $translated, $original, $domain ) {
 
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Venue' => 'Facility',
        'Venue:' => 'Facility:',
        'Venues' => 'Facilities',
        'Venue Website:' => 'Facility Website:',
        'Venue Phone:' => 'Facility Phone:',
        // Add some more strings here
    );
 
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
 
    return $translated;
}
// change the post type slug URL to be campuses
add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_venue_slug', 10, 2 );
function my_custom_venue_slug( $slug, $post_type ) {
    if ( $post_type == 'espresso_venues' ) {
        $custom_slug = array( 'slug' => 'facilities' );
        return $custom_slug;
    }
    return $slug;
}


Josh

  • Support Staff

May 29, 2018 at 9:34 am

OK that particular code is fine for text strings found within the page content. To correct the venue URL issue you can add this code to your theme’s functions file:

add_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite', 'my_custom_venue_slug', 10, 2 );
function my_custom_venue_slug( $slug, $post_type ) {
    if ( $post_type == 'espresso_venues' ) {
        $custom_slug = array( 'slug' => 'facilities' );
        return $custom_slug;
    }
    return $slug;
}

After you add the code you can head over to your site’s WP > Settings > Permalinks page and that will refresh the rewrite rules.

The support post ‘Split: The requested page route does not exist for the Event Venues admin page’ 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.

Event Espresso