Problem/Motivation

Author's name shows up as blank if the author is anonymous in breadcrumbs when viewing a blog post. Causes orphaned possessive apostrophes.

Proposed resolution

Use similar implementation to d7 but remove the link (and extra s) on the final breadcrumb title "Anonymous' blog".

Remaining tasks

Patch.

User interface changes

Users won't see the orphaned apostrophe anymore.

API changes

None.

Original report by @thursday_bw

Display of › 's blog in breadcrumb and in links on blog pages when author is anonymous (ie. $node->name is empty)

to recreate this, create a new blog content at node/add/blog,
in the Authoring information > Authored by: text box
(notice the description: 'Leave blank for Anonymous.')
make this value blank.

save the blog and view it.
notice the ugly breadcrumbs and links

I have attached a patch which modifies modules/blog/blog.module to hide
the author name section of the breadcrumb and remove the link to the authors blog
when the author is anonymous empty($node->name)

It may be a better solution to insert the word anonymous in place of a blank name so the breadcrumb and link would be anonymous's blogs or possibly have a setting created to choose the functionality.
In our projects case we chose to hide it so that is what the patch does. for now.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thursday_bw’s picture

Assigned: thursday_bw » Unassigned
Albert Volkman’s picture

Status: Patch (to be ported) » Needs review
meeli’s picture

Version: 6.19 » 6.x-dev
Issue summary: View changes
Status: Needs review » Needs work

Checked this in d7 but someone has kindly made it say "Anonymous's blog" (probably shouldn't have an s after the apostrophe but that's for another day).

So we can keep this as a d6 bug. I tested it to confirm and I can definitely see the issue both in the breadcrumb and the link. Screenshot attached.

As for d8, blog is no longer in core.

The patch above is fine for the breadcrumb but needs updates for code style:

  • Remove whitespace at the ends of lines 110 and 118
  • Indentation is wrong
  • Line 117 should have else on a new line

The patch provided will result in a breadcrumb that does not end at the current page... which is bad for various reasons. I think it would be better to use a similar approach to d7 but have no link (in d7 the link to Anonymous's Blog goes to blog/0 = 403 error).

meeli’s picture

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.