[wp-trac] [WordPress Trac] #31711: is_front_page flag affected by frontpage ID and page Title strange conflict

WordPress Trac noreply at wordpress.org
Fri Mar 20 14:04:04 UTC 2015


#31711: is_front_page flag affected by frontpage ID and page Title strange conflict
--------------------------+-----------------------------
 Reporter:  m_i_n         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I want to report a strange bug. The ''is_front_page'' flag has incorrect
 value in cases like described below:

 Front page in Settings / Reading is set to a static page:
 http://i.imgur.com/DzrbOVM.png
 This ''Sample Page'' ID is 2
 If you visit any other page, all is fine. For example the ''Lorem ipsum''
 page: http://i.imgur.com/n5M0x8R.png
 However, if you change title of this page to be the same as ID of a
 frontpage - in my case ''2'', then the ''is_front_page'' flag changes
 value to incorrect: http://i.imgur.com/KCa1JYo.png

 It happens for titles like: 2, 02, 000002. Basically always if
 (int)$page_title == $front_page_id

 The wrong ''is_front_page'' flag may affect themes/plugins which use it.

 It's quite rare for the bug to take effect, but it happens, as I got a
 report from a user of my theme.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31711>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list