Send to friend succes page – 404

This topic contains 32 replies, has 3 voices, and was last updated by  mar mop 9 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #21161

    mar mop
    Buyer
    Post count: 82

    Hi,

    After I have tested a “send to friend” link (which worked fine) I am redirected to a 404 error page when done. Is there any way I can edit this page or choose what the page is after the send-to-friend link has been successfully sent?

    http://newsite.eat-amsterdam.com/tales-spirits-cocktail-bar-amsterdam/?sendtofrnd=success

    Thanks!

    #21163

    Simone
    Expired Member
    Post count: 3515

    Hello, something is wrong with permalinks, could you please post your login details? Thanks,
    S.

    #21165

    mar mop
    Buyer
    Post count: 82
    This reply has been marked as private.
    #21174

    Simone
    Expired Member
    Post count: 3515

    Hi Marre, it appears that the “success” redirect loses the place/category/ from the url so it gives 404.
    Could you please try to deactivate all the plugin except the GD ones?

    #21175

    mar mop
    Buyer
    Post count: 82

    done!

    #21176

    Simone
    Expired Member
    Post count: 3515

    You’re fast, I like it 🙂

    You can reactivate the plugins, thanks.
    IN your website, some of the virtual pages are missing, please restore them using this tutorial

    #21177

    mar mop
    Buyer
    Post count: 82

    Thanks for the link to the tutorial but I have not touched any of the virtual pages – and they are all there. Should I still follow the tutorial?

    I am using a child theme to change the colors of the map – my first ever child theme by the way 🙂 – does that influence these results?

    #21178

    Simone
    Expired Member
    Post count: 3515

    In your website you have only 3 virtual pages, you can see them here yourdomain/wp-admin/edit.php?post_status=virtual&post_type=page , so 2 pages are missing 🙂

    #21843

    mar mop
    Buyer
    Post count: 82

    Hi Simone,

    I have followed the tutorial and added the code to the functions.php file in my child themes folder (right after the first <?php tage). The code in the file now looks as follows:

    
    
    <?php
    
    function geodir_restore_default_pages() 
    { 
    //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' ); 
    geodir_restore_default_page( esc_sql( _x('listings', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_listing_page', __('All Listings', GEODIRECTORY_TEXTDOMAIN), '' ); 
    geodir_restore_default_page( esc_sql( _x('add-listing', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_add_listing_page', __('Add Listing', GEODIRECTORY_TEXTDOMAIN), '' ); 
    geodir_restore_default_page( esc_sql( _x('listing-preview', 'page_slug', 'geodirectory') ), 'geodir_preview_page', __('Listing Preview', GEODIRECTORY_TEXTDOMAIN), '' ); 
    geodir_restore_default_page( esc_sql( _x('listing-success', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_success_page', __('Listing Success', GEODIRECTORY_TEXTDOMAIN), '' ); 
    geodir_restore_default_page( esc_sql( _x('location', 'page_slug', GEODIRECTORY_TEXTDOMAIN) ), 'geodir_location_page', __('Location', GEODIRECTORY_TEXTDOMAIN), '' ); 
    }
    function geodir_restore_default_page( $slug, $option, $page_title = '', $page_content = '', $post_parent = 0,$status = 'virtual' ) 
    { 
    global $wpdb, $current_user; 
    $page_found = $wpdb->get_var( 
    $wpdb->prepare( 
    "SELECT ID FROM " . $wpdb->posts . " WHERE post_name = %s LIMIT 1;", 
    array($slug) 
    ) 
    ); 
    if ($page_found) : 
    // Page exists 
    update_option($option, $page_found); 
    return; 
    endif; 
    $page_data = array( 
    'post_status' => $status, 
    'post_type' => 'page', 
    'post_author' => $current_user->ID, 
    'post_name' => $slug, 
    'post_title' => $page_title, 
    'post_content' => $page_content, 
    'post_parent' => $post_parent, 
    'comment_status' => 'closed' 
    ); 
    $page_id = wp_insert_post($page_data); 
    add_option($option, $page_id); 
    } 
    add_action('init' , 'geodir_restore_default_pages') ;
    
    add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
    function enqueue_child_theme_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
    }
    
    add_action('wp_footer' , 'geodir_set_custom_map_style');
    function geodir_set_custom_map_style()
    {
    ?>
    <script>
    var geodir_custom_map_style =[
    // Google Map Styles Starts Here
    
    {"featureType":"water","stylers":[{"visibility":"on"},{"color":"#acbcc9"}]},
    {"featureType":"landscape","stylers":[{"color":"#f2e5d4"}]},
    {"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#c5c6c6"}]},
    {"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#e4d7c6"}]},
    {"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#fbfaf7"}]},
    {"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#c5dac6"}]},
    {"featureType":"administrative","stylers":[{"visibility":"on"},{"lightness":33}]},
    {"featureType":"poi.park","elementType":"labels","stylers":[{"visibility":"on"},{"lightness":20}]},
    {"featureType":"road","stylers":[{"lightness":20}]}
    // Google Map Styles End Here
    ]
    </script>
    <?php
    }
    

    However, when I check the link you mentioned above (yourdomain/wp-admin/edit.php?post_status=virtual&post_type=page) I can still only see three virtual pages. Also, I am still forwarded to a 404 page after I have tested “send to friend”

    Am I doing something wrong?

    Thanks

    #21844

    Simone
    Expired Member
    Post count: 3515

    Hello, that is strange.

    Could you send your FTP details?

    #21846

    mar mop
    Buyer
    Post count: 82
    This reply has been marked as private.
    #21847

    Simone
    Expired Member
    Post count: 3515

    tried to login but It says Login failed

    #21851

    mar mop
    Buyer
    Post count: 82
    This reply has been marked as private.
    #21857

    Simone
    Expired Member
    Post count: 3515

    Made some tests, with no luck.

    Notified Stiofan-the-wizard.

    #21858

    mar mop
    Buyer
    Post count: 82

    so login is ok but recreating virtual pages failed – do I understand correctly?

    Thanks for notifying Stiofan!

Viewing 15 posts - 1 through 15 (of 33 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket