Custom Layouts Plugin: Breaking dev site

master branch, no changes.

@angus, getting this old error again, despite having patched it:

StandardError in ListController#latest
Attempting to access a non preloaded custom field, this is disallowed to prevent N+1 queries.
Extracted source (around line #160):

      else
        # for now you can not mix preload an non preload, it better just to fail
        raise StandardError, "Attempting to access a non preloaded custom field, this is disallowed to prevent N+1 queries."
      end
    end
  end

Any ideas how to resolve? It was installed once before, could the existing data be breaking it?

I’ve stripped out all other unofficial plugins …

I can’t repro it. That error is thrown if custom fields are not preloaded, which they are in the Custom Layouts Plugin:

Site.preloaded_category_custom_fields << key if Site.respond_to? :preloaded_category_custom_fields

Are you sure you’ve removed the tmp file on your instance after removing other plugins? i.e.

rm -rf tmp

Basic question - I don’t think this fully eradicates the historic presence of a plugin, right - is there something one might need to clear out in the DB via the API?

Could you explain a bit more what you’re thinking here? If the plugin itself is removed, removing the tmp file will remove the temporary memory that may have references to the plugin.

If the plugin stores anything in custom fields that data will remain.

That’s what I thought. So despite deleting tmp I still get the error in dev as above.