WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#927 closed defect (bug) (fixed)

wp_list_pages() returns a blank page title in the list

Reported by: error Owned by: michel v
Milestone: Priority: normal
Severity: major Version: 1.5
Component: General Keywords:
Focuses: Cc:

Description

When calling wp_list_pages() the returned list contains a blank $title, and therefore nothing appears under Pages. The resulting XHTML for each page entry is ... <a href="/page-slug/" title=""></a> ...

Change History (6)

comment:1 error9 years ago

  • Patch set to No

comment:2 ryan9 years ago

  • Owner changed from anonymous to michel v
  • Status changed from new to assigned

comment:4 anonymousbugger9 years ago

I've had this bug appear too, when viewing a static page the static page listings don't work.

The solution: the global variable $cache_pages seems to be used twice, in different contexts. Firstly, in wp-includes/functions.php, it stores the posts that generated the current page. Secondly, in wp-includes/template-functions-post.php, it is used to cache all static pages. Clearly, these are different functions, so one of the variables should be renamed -- I renamed all appearances in wp-includes/template-functions-post.php. and everything is now working great.

comment:6 ryan9 years ago

  • fixed_in_version set to 1.5.1
  • Resolution changed from 10 to 20
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.