concrete5/concrete5 — pull request #689 by shelkie (2012-10-12 23:06:23+00:00)
Title: Fix for layout move/delete issues

I finally got around to forking C5 and applying our fix for the problems that have been plaguing layouts: http://www.concrete5.org/community/forums/usage/layout-move-bug

I came up with this solution while we were building a new site for the Vancouver Aquarium (www.vanaqua.org) last year. We were using layouts and layout presets extensively in this site, and found they were acting very strangely. Particularly, moving or deleting often resulted in the wrong layout being affected.

After inspecting the data schema for layouts, it became apparent that there was no Unique Index being used to uniquely identify a particular layout. This was/is causing the wrong layout to be changed/deleted.

My fix uses the “areaNameNumber” as a Unique Index, and makes moving and deleting layouts very reliable. It also eliminates the need for the page reload fix that was introduced in April.