WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] post_title sanitization for post_name (6 posts)

  1. FlyerUA
    Member
    Posted 1 year ago #

    So I have latest WP and WP SEO and I got some weird problem.
    Since 1.2 "to" is removed from post_title when sanitizing it for post_name field in DB. For example, post title is (without "") "Lupin III: Mine Fujiko to Iu Onna - Episode 11" so now it produces "lupin-iii-mine-fujiko-iu-onna-episode-11" instead of "lupin-iii-mine-fujiko-to-iu-onna-episode-11" as it is supposed to do and as it was before.
    If this is intended as "deletion of stopwords" or something, is there any way to disable it?
    Also, side question, am I blind, or there is no more option to disable date in snippets? I'm pretty sure I was able to turn it off somehow

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    That is intended behavior and it's impossible to turn that off right now. Could you tell me why the heck you'd want to turn that off?

    As for dates in snippet previews: it only disabled it in the preview, making people wrongly think it would remove them from their snippets in Google, which the plugin can't do. That's why it's gone. There's a filter you can use now to have the plugin remove it.

  3. FlyerUA
    Member
    Posted 1 year ago #

    Oh, I see. Because
    1. I like to have control over my links
    2. I want url to be just sanitized version of title
    3. I wrote plugin for my site that depending on part of post_name of post in certain category does some things. Rewriting it to match newer posts will result in breaking of old ones. For example, if post_name contains lupin-iii-mine-fujiko-to-iu-onna some things done, so if I rewrite to match lupin-iii-mine-fujiko-iu-onna which is only applies to Episode 11, posts with episodes from 01 to 10th will be broken, which is no good.
    So, will adding remove_action for wpseo_remove_stopwords_from_slug or just removing add_action for wpseo_remove_stopwords_from_slug itself properly disable it?
    As for snippets, if it's not completely removes them but just from preview, I guess there is indeed no real need for that option.

  4. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    1.: if you change it manually, the plugin won't revert it.

    remove_filter will work, yes.

  5. FlyerUA
    Member
    Posted 1 year ago #

    I misread it. it was indeed add_filter, and not add_action.
    As for reversion, I can do it myself

  6. Joost de Valk
    Member
    Plugin Author

    Posted 1 year ago #

    OK!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.