jdevalk/wordpress-seo — pull request #73 by jrfnl (2013-07-03 02:05:40+00:00)
Title: Enhancement: Improved breadcrumbs and titles for 404 pages

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

**Enhancement as first reported in [this forum thread](http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-bug-fix-for-title-and-breadcrumbs-of-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:
* http://yoursite.com/1995/04/11/
* http://yoursite.com/1995/04/
* http://yoursite.com/1995/
* http://yoursite.com/test/

#### 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*
* Page not found: 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

**This commit fixes this.**