jomz/radiant-reorder_children-extension — Issue #2: Adding Stylesheets or JavaScript Pages raises Error if more than 1 Page is present
Author: mstarke
Created: 2012-02-15 13:32:03+00:00
State: open

When a Page is created with the Sheets extension (Stylesheet or Javascript) it's position is NULL. On adding a new page the Extension tries to increment NULL (and fails). This is a serious issue. Setting the position to 0 on the first creates CSS or JS page fixes this.

>NoMethodError (undefined method '+' for nil:NilClass):
> /radiant-reorder_children-extension-1.0.5/lib/reorder_children/page_extensions.rb : 9 : in 'update_position'
> /radiant-sheets-extension-1.0.5/app/controllers/admin/sheet_resource_controller.rb : 24 : in 'create'