• Resolved aliceonfire

    (@aliceonfire)


    Just want to let you know that it seems this plugin doesn’t support posts with full stops in their permalink.

    An example would be example.com/news/software-updated-to-v1.5.3-today/

    I have a few posts of this sort on my sites that all get 404 errors for the AMP version with this plugin. I am only assuming the full stops to be the problem, as all the posts without full stops within the same categories work just fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author weeblrpress

    (@weeblrpress)

    Hi @aliceonfire

    Having trouble reproducing this. WP tranforms dots into dashes when creating the URL of a post with dots in the title, so I manually modified the post name in the database to emulate having a dot.

    When I do that, I do indeed get a 404 for the AMP pages, but I also get a 404 for the standard pages, ie WP (4.9.5) does not accept those URLs basically.

    So I then modified the sanitize_title_with_dashes() function to force WP to accept dots in URLs:


    $title = preg_replace(‘/&.+?;/’, ”, $title); // kill entities
    //$title = str_replace(‘.’, ‘-‘, $title);

    $title = preg_replace(‘/[^%a-z0-9 _-]/’, ”, $title);

    That made WP accepts dots in URLs for regular posts and pages. I then tested the AMP version of the page and that worked fine too. Here is a screenshot of that:

    https://assets.weeblrpress.net/images/screenshots/weeblrpress-2018-05-08-12.10.22.png

    Please advise which version of WP this is happening with, and how you made WP accept dots in URLs. Your particular method of making it accepts dots will probably give insight as to why this is happening on your site.

    Best regards

    Plugin Author weeblrpress

    (@weeblrpress)

    Hi

    Closing this as it seems unrelated to weeblrAMP.

    Best regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘pages with full stops in name’ is closed to new replies.