Support » Plugin: Ajaxize » Not working on my 404 pages

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author yoav.aner

    (@yoavaner)

    Hi Joshua,

    Apologies for the late reply. I somehow missed this.

    Ajaxize should work on all pages, including 404’s. I’m not entirely sure why it doesn’t work for you. As far as I can see, the call that fetches data from ajaxize returns a 404. However, when I access it directly, e.g.

    https://vizualrecords.com/nothinghere?ajaxize_this=ajaxize_this%3Avizual_shopping_cart%3A0e4d1ee21d4b8ddd9f8bbf06d3b7cb26b21ea7f7&_wpnonce=e32f26fd01

    it works.

    So could be because it’s an XHR or something… Not entirely sure.

    I wish I had time to investigate in detail, but unfortunately things are very busy right now. I will try to find some time for this, but not sure when… 🙁

    Thank you for your understanding.

    joshuaiz

    (@joshuaiz)

    No worries Yoav.

    Strange that it is only this page. Not a huge deal and I guess this is an outlier case but it would be good to get it solved at some point.

    Best,

    Joshua

    Plugin Author yoav.aner

    (@yoavaner)

    Yeah, it’s strange. I just tested it on my own wordpress blog and it seems to work ok, even on the 404 page… So I’m not entirely sure.

    The more info I have about your wordpress setup, the easier it is to troubleshoot, but even then I’m not 100% sure.

    Perhaps you can try on a separate wordpress instance with a similar configuration as yours? try to see if it happens there. Maybe disable some plugins one by one and check if any of those has an effect?

    joshuaiz

    (@joshuaiz)

    I have a local install that’s exactly the same so I can play around with it there although I know next to nothing about XHR + ajax.

    If I find anything I’ll let you know.

    Plugin Author yoav.aner

    (@yoavaner)

    Ok, great. I’m curious. I’d love to help, but just time is a bit tight right now unfortunately… and without being able to reproduce this on a wordpress instance that I can ‘play’ with directly, it’s going to be difficult to troubleshoot anyway.

    joshuaiz

    (@joshuaiz)

    Ok so I was able to find a workaround. Using is_404 I can load the ajaxize divs on all pages except 404 and on the 404 page load the standard functions.

    Additionally, I think I’ve turned off caching on 404 pages by adding this in WP Super Cache:

    404\.php

    Although I don’t know if the above is correct. 404 errors use the 404.php template in my theme.

    I’ll have to test some more to see if this retains the user’s logged-in/out status and shopping cart contents but it is better than before.

    joshuaiz

    (@joshuaiz)

    Update: using the above string “404\.php” didn’t work but what does is adding a tiny script in the header to add a hash term to the URL:

    <?php if ( is_404() ) { ?>
    
     <script>
     window.location.hash = '#404';
     </script>
    
     <?php } ?>

    Then you can enter “#404” as a string in WP Super Cache to disable caching. So far it seems to be working.

    Plugin Author yoav.aner

    (@yoavaner)

    Hi Joshua,

    I’ve released version 1.4.1 of Ajaxize. It has an option to remove Ajax Referer Check. Perhaps this could help with your 404 page? I’m not entirely sure, because it fixes something slightly different. Worth trying though.

    Cheers
    Yoav

    p.s. I made a comment on another thread, but would be nice if you could also link directly to my blog from your post about Ajaxize.

    Plugin Author yoav.aner

    (@yoavaner)

    I think this can be closed now.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Not working on my 404 pages’ is closed to new replies.