Skip to:

Opened 10 years ago

Closed 10 years ago

#5544 closed defect (bug) (fixed)

Custom component directory title

Reported by: imath's profile imath Owned by: boonebgorges's profile boonebgorges
Milestone: 2.0 Priority: normal
Severity: normal Version: 2.0
Component: Core Keywords: has-patch 2nd-opinion


Since r8080, a new parameter 'directory_title' has been introduced to allow a component to set the directory page title.

It's nice but i think the change applied to bp_modify_page_title() introduced a little regression considering 1.9.x.

Before the page title of the custom component was set using bp_get_name_from_root_slug(), now the function bp_get_directory_title() first checks for component's 'directory_title' argument to see if it's set, which is always the case. Problem is that it's set with an empty value. So custom component that used to have a page title set thanks to bp_get_name_from_root_slug() will no more have a page title.

The patch attached simply changes isset in favor of ! empty which is fixing the issue.

Attachments (1)

5544.diff (506 bytes) - added by imath 10 years ago.

Download all attachments as: .zip

Change History (5)

10 years ago

#1 follow-up: @boonebgorges
10 years ago

imath - This looks good at a glance, but can you please give a specific example of a plugin or customization that illustrates the issue? I want to be able to see it for myself.

#2 in reply to: ↑ 1 @imath
10 years ago

Replying to boonebgorges:

I want to be able to see it for myself.

I think it's all plugins that have a directory page actually, i've seen it while working on BuddyPress Skeleton Component (branch 1.7) and just saw it on BuddyDrive as i need to quicky update it as of changes in plupload in WP 3.9.

The page title is not showing the component's name <title> | Site name </title>

#3 @boonebgorges
10 years ago

Thanks, imath.

#4 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8276:

Use empty() rather than isset() when checking for fallback directory_title component properties

isset() always returns true, even for empty values.

Fixes #5544

Props imath

Note: See TracTickets for help on using tickets.