Opened 8 years ago

Closed 8 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
Priority: normal Milestone:
Component: General Version: 1.5
Severity: major Keywords:
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)

  • Patch set to No

comment:2   ryan8 years ago

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

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   ryan8 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.