WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[Bug? + Fix] for title and breadcrumbs of 404 pages (3 posts)

  1. jrf
    Member
    Posted 1 year ago #

    Hiya,

    Not sure whether this can be called a bug or whether it is by design, but I encounter some unexpected behaviour for this plugin on 404 pages.

    WP 3.4.3
    WordPress SEO 1.2.8.4
    PHP 5.2.9

    Breadcrumb and title for invalid day/month/year archive page and other 404 pages

    What I did/how to reproduce the issue:
    I wanted to test the page users would be presented with when they visited a date-archive for a day/month/year in which no blogposts where published and for a non-existant category/article.

    I tried both of the following as a 404 title template (for the non-date based pages):
    You looked for: %%searchphrase%% %%sep%% %%sitename%%
    You looked for: %%title%% %%sep%% %%sitename%%

    On one of your own blogs, try for example:

    What I expected to happen:
    That the title would say:

    • 11 april 1995 - my blog name
    • april 1995 - my blog name
    • 1995 - my blog name
    • You looked for: test - my blog name OR
    • You looked for: test - my blog name

    And that the breadcrumb would show:

    • Home -> Blog -> 11 april 1995
    • Home -> Blog -> april 1995
    • Home -> Blog -> 1995
    • Home -> Error 404: Page not Found => this is done as expected

    What did happen:
    For the date based pages:
    The title came back as the 404-title
    The breadcrumb, similarly, showed the 404 breadcrumb message

    For the non-existant category/article pages:
    The title came back as:
    You looked for: - my blog name - i.e. the phrase/slug/category/article name isn't there

    I've worked out how to patch this and created the code based on the current development version of the plugin.

    Please find the patch in the form of find & replace php-code here: http://pastebin.com/w0EPBa5S

    Please accept this patch as a compliment to your excellent work ;-)

    Hope this helps!

    Smile,
    Juliette

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

  2. Epen99
    Member
    Posted 7 months ago #

    hi......

  3. jrf
    Member
    Posted 7 months ago #

    @Epen99 ??

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic