silverstripe / silverstripe-cms

Silverstripe CMS - this is a module for Silverstripe Framework rather than a standalone app. Use https://github.com/silverstripe/silverstripe-installer/ to set this up.
http://silverstripe.org/
BSD 3-Clause "New" or "Revised" License
515 stars 332 forks source link

[2012-11-28] Add Page parent page selection does not display page titles #599

Closed silverstripe-issues closed 11 years ago

silverstripe-issues commented 11 years ago

created by: @sekjal (iwalls) assigned to: @sekjal (iwalls) created at: 2012-11-28 original ticket: http://open.silverstripe.org/ticket/8056


Sometime between 3.0.3-rc1 and 3.0.3, when adding a new page, the values under "Choose where to create this page" stopped displaying "Top level" and "Under another page", and replaced them with "0" and "1" respectively. See attached screenshot.

Git bisect (of sapphire repository) points to commit b6017a7c902e5e66835dfbd4884924a56ac9a370:

Author: Andrew O'Neil andrew@silverstripe.com Date: Mon Nov 12 16:25:55 2012 +1300

BUGFIX: ArrayList now discards keys of the array passed in and keeps the numerically indexed array sequential. This fixes FirstLast and EvenOdd in templates, and makes ArrayList more consistent, as several methods already discarded the keys

This makes sense, since 0 and 1 are the indices for "Top level" and "Under another page" in the parentModeField array.

Categorizing this as a CMS issue, though the change that caused it is in the Framework.

silverstripe-issues commented 11 years ago

comment by: @sekjal (iwalls) created at: 2012-12-04


I have created a draft solution for this issue. It can be found here: https://github.com/sekjal/sapphire/commit/0d407f31261061b2f1e863ecce524f598aa18d9d

This is my first bugfix submission, so any helpful hints are more than welcome!

chillu commented 11 years ago

This has been fixed since.