Make WordPress Core

Opened 13 years ago

Closed 13 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:


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)

#1 @error
13 years ago

  • Patch set to No

#2 @ryan
13 years ago

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

#4 @anonymousbugger
13 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.

#6 @ryan
13 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.