• Resolved rely28

    (@rely28)


    Hi,

    Since I don’t want my whole website to be messed with URL redirect and changing only some specific custom page permalink, I wanted to select Articles and Pages in the Excluded content types setting.

    But, by doing so, I have the same problem as if I disable the whole plugin, I receive a lot of error 404 with on pages like in the URL I’ve entered below…. I thought disabling the plugin would reverse back URL’s to how they were since I didn’t touched them through the plugin (the only URL have changed are the custom post ones… that’s precisely why I want to exclude the articles and pages)

    Why is it causing such a mess ?

    • This topic was modified 5 years, 7 months ago by rely28.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter rely28

    (@rely28)

    Just to let you know, if you check right now, the error won’t appear as I had to obviously put the site back to when it was working, cannot leave the website with all the error 404, but my question rmain, why changing these settings or even disabling the plugin is messing up all the URL of the page ?

    To add more information, I did set the wordpress permalink long before I use your plugin and did not changed them while using it.

    Plugin Author Maciej Bis

    (@mbis)

    Hi @rely28,

    I checked the sample URL you provided and page object data by appending ?debug_redirect to the end of URL.

    The original native slug is: “photos-thailande-sud-krabi-koh-phi-phi” and that particular page is a child page of “photos-thailande/sud/krabi”. Therefore, the native/original URL should be:
    https://www.thailande-et-asie.com/photos-thailande/sud/krabi/photos-thailande-sud-krabi-koh-phi-phi

    The problem here is that there is some mismatch between the slug (koh-phi-phi) used in the custom permalink and the native/original slug (photos-thailande-sud-krabi-koh-phi-phi).

    My plugin does not change the native slugs automatically, so basically there are two options here:

    • the native slug was always set to: photos-thailande-sud-krabi-koh-phi-phi and only the custom permalink changed from photos-thailande-sud-krabi-koh-phi-phi to different URI (with slashes inside): photos-thailande/sud/krabi/koh-phi-phi
    • both the original and custom permalink were set to photos-thailande/sud/krabi/koh-phi-phi, but for some reason the native slug was at some point manually changed from koh-phi-phi to: photos-thailande-sud-krabi-koh-phi-phi

    Please let me know if you need any further assistance.

    Best regards,
    Maciej

    • This reply was modified 5 years, 7 months ago by Maciej Bis.
    Plugin Author Maciej Bis

    (@mbis)

    Hi again @rely28,

    I think that this issue might be related to another problem you encountered with Meow Gallery and Meow Lightbox:
    https://wordpress.org/support/topic/slug-being-left-as-undefined-on-yoast-preview/

    That would explain why the native slugs were changed. After you excluded my plugin from filtreing the posts & pages permalinks, the permalinks with malformed slugs were used instead of the custom permalinks (that were also identical to the original permalinks).

    Best regards,
    Maciej

    Thread Starter rely28

    (@rely28)

    Hi,

    I forgot already about that one… fact is so far there is no way to get it back ? I don’t believe disable those plugins would do the trick… I’ll give a try after the website got fully backed up tomorrow but that’s really annoying…

    Plugin Author Maciej Bis

    (@mbis)

    Actually, I think I know how to easily fix this issue. A few months ago I wrote a mini plugin that could be helpful in this particular case.

    You can download it using the below URL:
    https://permalinkmanager.pro/custom-permalinks-to-slugs.zip

    In “PM -> Slugs” admin section you can display a list of posts and pages where the slug used in the custom permalink is different than the native slug.

    • “Old slug” is an actual native slug.
    • “New slug” is a slug parsed from the custom permalink saved with my plugin.

    Then, you can select for what posts & pages the slug from custom permalink should be copied.

    Before you use this tool, I would recommend to do (just in case) the backup of wp_posts MySQL table.

    Finally, after you fix the native slugs, you will be able to freely disable that mini-plugin & exclude posts and pages from my plugin.

    If you need any assistance with this process, please contact me via email contact /at/ maciejbis.net

    Best regards,
    Maciej

    Thread Starter rely28

    (@rely28)

    Ok, by checking the database, here is what I remark, only the pages which I updated lately, since I installed your plugin, do have a default URL messed up when I save them, otherwise, when checking other pages, they look fine. So there is something going on when saving a page…

    Plugin Author Maciej Bis

    (@mbis)

    Ok, I see.

    Do you possibly used either “Native slug” field:
    https://permalinkmanager.pro/docs/faq/native-slug-in-wordpress-permalinks/

    or “Slug” field in Yoast’s metabox?

    As I mentioned earlier, my plugin is not able to automatically update the native slug. When it comes to Permalink Manager, it can be done either by manual adjustment with “Native slug” field or with “Regenerate/reset” tool (“Native slugs” mode).

    Thread Starter rely28

    (@rely28)

    I was not using that option (just saw it before seing you’re answer)

    Not using Yoast metabox since it’s not working (see my other post you posted earlier). Per your knowledge, do you know any plugin that could cause this ? I’ve tried before Cutom Permalink plugin, could it be because of that one ?

    So far I did put the permalink manually by getting in the database, luckily, I was not modifying a lot of pages and posts lately so I believe it should not mess things up anymore…

    Plugin Author Maciej Bis

    (@mbis)

    It is hard to say what plugin is the problem here. Nevertheless, if you encounter this problem again I can prepare a custom code snippet that could troubleshoot why and how the native slug is malformed.

    Thread Starter rely28

    (@rely28)

    Hopefully I won’t have any trouble anymore… Thanks for checking the issue.

    • This reply was modified 5 years, 7 months ago by rely28.
    Plugin Author Maciej Bis

    (@mbis)

    Hi @rely28,

    personally, I would recommend to check if the $_POST[‘post_name’] variable is not altered by those plugins when the post data is saved.

    Thread Starter rely28

    (@rely28)

    I did the test, now it’s seems to be working fine. I believe it might have been Custom Permalink plugin that may have cause this on first place. But so far so good.

    Plugin Author Maciej Bis

    (@mbis)

    Ok, thank you for keeping me updated!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Error 404 when partially disabled’ is closed to new replies.