• Resolved petefuseloft

    (@petefuseloft)


    I’ve been trying to get this working in a dev environment, after updating the plugin from an old version, which had been working.

    The plugin seems to be working up to a point, but when it makes the ajax request to access the next post, the post’s URL, in the request, has “alnp/” appended to it.

    So, this returns a 404. The plugin is appending the hr element with the correct URL, and trying to load the content for the next post, but it’s not able to because the URL in the http request is wrong.

    For instance, if the next post’s URL is https://site.com/news/article-2/, the data-url attribute of the hr will be correct, but the ajax request URL is https://site.com/news/article-2/alnp/

    Any insight would be greatly appreciated

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sébastien Dumont

    (@sebd86)

    Hi @petefuseloft

    The Ajax request is correct. It sounds like you may need to simply refresh your permalinks since updating from the older version of the plugin.

    Visit the permalinks settings page within your dashboard and press save. This will flush out any permalinks no longer in use and register the new permalink for Auto Load Next Post.

    Hope that helps. If the problem still persists, let me know.

    Thank you.

    Thread Starter petefuseloft

    (@petefuseloft)

    Hi Sébastien,

    Thanks for your reply! Flushing the permalinks looks like it did help with one issue, but I’m still unable to get the new version of the plugin to work with my theme. The selectors haven’t changed and the HTML is valid.

    Here’s a live post, using v1.4.11 of the plugin. It works for me, but my client says it’s not working, and we have the same machine, macOS version, and browser versions, so this is causing some confusion:
    https://minniechostudio.com/capillaries/

    If I update to the current version, it breaks the functionality completely.

    In my local environment, with the updated plugin, when it scrolls to the bottom of a post, it appends a #response block, inside of my #comments div, and adds an hr with the correct data-url. If I scroll back to the top and down again, it continues to add more hrs and #response blocks, but after a couple times, the data-url for the rest of the hr tags is “undefined”

    I’ve tried moving the comments and post-navigation block inside/outside of the #content and article.post divs and nothing is working unfortunately.

    Can you see, based on that page, what I’m doing wrong? I’ve used your plugin and the underlying javascript library several times with no issues, but I’ve been trying to debug this specific problem for two days now, and I can’t get it working.

    Thanks again for any assistance.

    Plugin Author Sébastien Dumont

    (@sebd86)

    If I update to the current version, it breaks the functionality completely.

    I actually finished writing a page about upgrading from older versions of Auto Load Next Post.

    https://github.com/AutoLoadNextPost/alnp-documentation/blob/master/en_US/upgrading.md

    In my local environment, with the updated plugin, when it scrolls to the bottom of a post, it appends a #response block, inside of my #comments div, and adds an hr with the correct data-url.

    I don’t know what would cause that other than you moving the comments around or you have another plugin that does something for comments. It’s hard to see since this is happening only on your local environment.

    I’ve tried moving the comments and post-navigation block inside/outside of the #content and article.post divs and nothing is working unfortunately.

    I would put back the comments and post navigation to their original locations and update to the latest version of ALNP. I see no reason why we can’t get it to work for your theme.

    Is this a custom theme? Would you be able to share the theme files with me to take a look?

    Thread Starter petefuseloft

    (@petefuseloft)

    Thanks so much. I didn’t realize that upgrade doc existed in the github page, and I hadn’t renamed the content-partial template to content-alnp.php. that was the reason it wasn’t working. It seems to be working fine now.

    Thanks again for your responsiveness, Sébastien!

    Plugin Author Sébastien Dumont

    (@sebd86)

    Your welcome @petefuseloft

    Glad to have helped.

    P.S. The upgrade doc is new. Currently re-writing the documentation and clearly this one was missing for users who are still on the older versions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 on ajax request’ is closed to new replies.