Support » Plugin: Custom Permalinks » Error with AMP url

  • Resolved silencedgd

    (@silencedgd)


    Hi,

    With the AMP Official plugin installed, when you try to update a post which has a custom permalinks url, the plugin “custom permalinks” creates a “double permalink url” with a new type “Amp_validated_url”. When you try to access to that post, it redirects to the main page. The only solution is to delete manually that new permalink (type: Amp_validated_url) created.

    I have tried to add this code to avoid the new “false” permalink to be created:

    “function yasglobal_exclude_post_types( $post_type ) {
    if ( $post_type == ‘Amp_validated_url’ ) {
    return ‘__true’;
    }
    return ‘__false’;
    }
    add_filter( ‘custom_permalinks_exclude_post_type’, ‘yasglobal_exclude_post_types’);”

    But it doesn’t work.

    Thanks for your support.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @silencedgd

    I am not able to generate this issue on my end with AMP v1.5.5 and Custom Permalinks v1.5.1

    I have checked this with Gutenberg or without Gutenberg. Also, I have checked this on default WordPress Post and with custom PostType.

    Can you please check your WordPress version, PHP version, Plugins version and on which PostType you are getting this issue.

    Regards,
    Sami

    Thread Starter silencedgd

    (@silencedgd)

    Hi Sami, thanks for your answer. I have just reproduced the error in a new site.

    WordPress version:
    Wordpress 5.4.2

    Plugins installed:
    AMP 1.5.5 (Template Mode: Standard + Supported Templates Serve all templates as AMP regardless of what is being queried (checked)).
    Custom Permalinks 1.5.1 (I have also tried with your new alpha version with the same results).

    How to reproduce the issue:

    Create a new post and publish it. Then change the permalink and update the post.

    If you go to the “PostTypes Permalinks” section, you will see that the plugin has created 2 permalinks, one with the new post permalink you have setted, and a new one “Amp_validated_url” which creates the redirection issue.

    Kind Regards

    • This reply was modified 7 months ago by silencedgd.
    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @silencedgd

    I have retest the issue as per your defined way but not able to generate it on my end.

    I using Custom Permalinks 1.6.0-beta2 version with AMP version 1.5.5. I have test this by with and without Gutenberg.

    In AMP, I have selected Standard mode and checkbox is checked.

    I have created a new post and publish it. Then change the permalink and update the post. I have tried this process with Gutenberg and without Gutenberg but the issue you are reporting os not generating on my end.

    Can you please try with Custom Permalinks version?
    https://github.com/samiahmedsiddiqui/custom-permalinks/releases/tag/v1.6.0-beta2

    Maybe, the issue is already resolved.

    Regards,
    Sami

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @silencedgd

    Please retest the issue with the latest version of the plugin. If the issue still persist, please let me know.

    I have already tested the issue with your provided settings and didn’t find any issue on my end so not sure is whether I am missing something or what. So, please rested and provide me your feedback.

    Regards,
    Sami

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    @silencedgd As per not getting any response from last 2 weeks, I am marking this topic as resolved.

    If you still have this issue then please open a new topic.

    Thanks & Regards,
    Sami

    Hi there !
    Same problem here with WP 5.4.2, AMP 2.0 and Custom Permalink 1.7.1.

    Exactly the same bug as reported by the first message of this topic :-/.

    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @thmmagazine Thank you for reaching out to me.

    Can you please provide me the steps to reproduce this issue? I have following the steps that @silencedgd provided but the issue issue is not occurring on my test site.

    By the way, Are you using Gutenberg or classic editor on the post type?

    Thanks and Regards,
    Sami

    Hey ! Just replied on the other topic ^^
    We’re using the Classic Editor

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error with AMP url’ is closed to new replies.