Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, i sent you a reply via email.

    Thread Starter mrrana

    (@mrrana)

    i already tried your suggestion (going to wp-admin / Settings / Permalinks panel, click “Save Changes” button without changing anything, this should reset WP router and hopefully fix URLs.) but it didnt work, any other idea? i also readed that some “redirect” plugins may cause a problem, i deactivated the one i had but it didnt work either, please help me, thanks in advance

    Thread Starter mrrana

    (@mrrana)

    also when the plugin is deactivated and you still try to enter to one of the classified posts using the url (example: http://www.meditegic.com/seminuevo/tomografo-ge-discovery-st-16-2008) you still got redirected to the Home page.

    jnorell

    (@jnorell)

    Hi,

    I am also having issues with this. I don’t see a visible resolution to this. If there is one can you please send it my way.

    Thanks..

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    try the following
    1. disable all plugins you have installed on site except for WPAdverts
    2. go to wp-admin / Settings / Permalinks panel and click “Save Changes” without changing anything.
    3. see if the Ad details pages work.

    Also do you have the WPAdverts modified somehow (using snippets)? and what is your website URL?

    jnorell

    (@jnorell)

    Hi Greg,

    I believe we saved permalinks last week. This week disabled the plugins, changed to the default theme, and it worked fine; we then switched back to the normal theme and re-enabled the plugins one by one, so we’re right back where we started, but it appears to be working for now.

    Thanks..

    • This reply was modified 7 years ago by jnorell.
    • This reply was modified 7 years ago by jnorell.
    jnorell

    (@jnorell)

    This is having the same problem again, and the same process doesn’t get it working again (nor the steps you posted); what does work is changing to the Twenty Seventeen theme, but changing back to the normal theme doesn’t keep working now.

    This was working earlier today. We updated 2 plugins (ninja forms & wp seo), and most recently we purchased and installed your “all extensions bundle”, enabled custom fields and maps and locations, then updated custom fields (via entering license code); I don’t know exactly at what point it started with this redirect behavior, but that’s when it was noticed. Disabling (almost) all plugins didn’t fix it (acf and responsify wp plugins are required or the site won’t load). Also in that timeframe we were testing adding an ad as an anonymous site user (having just added moderation=”1″ to the add shortcode), and that process is sitting at the “Place Order” button right now.

    The site we’re working on is https://dev-pharo-cattle.pantheonsite.io/

    The theme is custom (we didn’t create it, but have taken over management/development). We have not modified wpadverts via snippets (yet).

    Any more tips on how to go about trhoubleshooting that?

    Thanks!

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, if it is working properly with other themes but not with the one you are using as a default then most likely the problem is in the theme.

    One thing you can try is to add the code below in your theme functions.php

    
    add_filter("wp_redirect", "my_debug_redirect");
    function my_debug_redirect($r) {
        debug_print_backtrace();
        exit;
    }
    

    Now when “something” will try to do a redirect this code will stop it and print backtrace to the code which caused a redirect, this should allow to find what is causing it, if the redirect code is executed using wp_redirect function.

    jnorell

    (@jnorell)

    Thanks Greg, that did produce a backtrace, so indeed wp_redirect is called, but I’m not finding anything with that, it seems to only load core files and run core functions up to the point the my-debug_redirect filter is called. Maybe you could get more meaning from it; the ad url was https://dev-pharo-cattle.pantheonsite.io/classified-cat/pcc-bull-ne and the backtrace:

    
    #0  my_debug_redirect(https://dev-pharo-cattle.pantheonsite.io/)
    #1  call_user_func_array(my_debug_redirect, Array ([0] => https://dev-pharo-cattle.pantheonsite.io/)) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:300]
    #2  WP_Hook->apply_filters(https://dev-pharo-cattle.pantheonsite.io/, Array ([0] => https://dev-pharo-cattle.pantheonsite.io/,[1] => 301)) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/plugin.php:203]
    #3  apply_filters(wp_redirect, https://dev-pharo-cattle.pantheonsite.io/, 301) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/pluggable.php:1159]
    #4  wp_redirect(https://dev-pharo-cattle.pantheonsite.io/, 301) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/canonical.php:516]
    #5  redirect_canonical()
    #6  call_user_func_array(redirect_canonical, Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:298]
    #7  WP_Hook->apply_filters(, Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/class-wp-hook.php:323]
    #8  WP_Hook->do_action(Array ([0] => )) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/plugin.php:453]
    #9  do_action(template_redirect) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/template-loader.php:12]
    #10 require_once(/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-includes/template-loader.php) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-blog-header.php:19]
    #11 require(/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/wp-blog-header.php) called at [/srv/bindings/dbeadb5df990493987c80fa808f7267e/code/index.php:17]
    

    We do use Yoast SEO Premium for some redirects, but I just disabled it again and confirmed the problem still exists.

    Thanks for your help!

    Plugin Author Greg Winiarski

    (@gwin)

    Hmm it seems the redirect is being done by WordPress only, maybe the WPAdverts routes are not registered in WP router for some reason.

    The only thing i can think of right now is to disable the redirect_canonical and see if it helps, adding the code belo to your theme functions.php should do that

    
    add_filter( "redirect_canonical", "__return_false" );
    
    jnorell

    (@jnorell)

    Ok, I tried disabling redirect_canonical as you posted, and it does not help much. With redirect_canonical enabled, loading an ad page redirects to the site homepage; with it disabled, loading an ad page leaves the url the same (no redirect), but it still just displays the site homepage.

    How would you go about debugging wpadverts route registrations? Is there a way to eg. “dump all registered routes”, or a good place to add debugging statements to where wpadverts registers them?

    Thanks…

    jnorell

    (@jnorell)

    Ok, a big apology Greg, in digging into this I do find some snippets modifying wpadverts which were causing this issue.

    They were based on https://github.com/simpliko/wpadverts-snippets/blob/master/custom-slugs/custom-slugs.php and added months ago then forgotten about, as we just started working on this project recently.

    Thanks for your support, and again, sorry about that.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, ok great, thanks for posting feedback, maybe someone in the future will find this thread useful.

    BTW. If you are finding the plugin useful i would be thankful if you could write a short one or two sentence review here https://wordpress.org/support/view/plugin-reviews/wpadverts

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Classified posts redirect to home page’ is closed to new replies.