The attached patch makes the internal process for instantiating a box object. The main change was to split value loading from object instantiation. Creating boxes from a value array is now cleaner, which reduces code and makes the spaces integration more straight forward.

This patch needs testing on sites that have existing boxes and custom box types.

Comments

jmiccolis’s picture

StatusFileSize
new8.05 KB

Slightly improved patch, minor changes.

jmiccolis’s picture

StatusFileSize
new8.88 KB

This patch changes the way overrides are stored. Previously we where storing an array representation of the box in a spaces override, however ctools always returns an object when the same settings are fetched from the `box` table, this cause all sorts of issues. Here the overrides are stored as a `stdClass` so that when they are retrieved they look just like they'd come back from ctools.

Warning: this patch does change how overrides are stored! It is meant for testing sites only! Make sure you've got backups!

jmiccolis’s picture

StatusFileSize
new8.92 KB

Another update, this fixes a behavior which prevented overridding boxes that actually exist at the site level. However a but remains with editing site-wide boxes inline - the change gets saved and is visible on a page refresh - but the old value get's returned in the ahah call.

mrtorrent’s picture

subscribe

jmiccolis’s picture

StatusFileSize
new9.26 KB

This version properly clears the boxes object cache. Needs a bit more testing, but I think it's very close.

David Goode’s picture

StatusFileSize
new10.06 KB

Added an update hook, tested with user and og space in openatrium as well as overall site space, both editing and adding. No changes made other than adding update hook.

jmiccolis’s picture

Priority: Normal » Critical

Raising the priority of this patch. We need to make sure it's in the next release.

jmiccolis’s picture

Status: Needs review » Fixed

This has been committed http://drupal.org/cvs?commit=382882

Thanks David for the testing and upgrade patch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.