Hi,
I ran into a small problem, when trying to develop a custom views cache plugin.
Hooks (hook_views_api, hook_views_plugins) were correctly setup, and the cache plugin was visible in the ui, but could not be selected or configured ("settings").
Turns out i forgot to add the cache plugin in the files[] section of the .info file. Whilst this is not really a views issue, it would be great if the _views_create_handler()-function could provide a little debug/warning.
As discussed with @dereine on IRC, please find a small patch attached.
Comments
Comment #1
dawehnerWhat about a short suggesting to look up in .info files?
This was your major issue, so ...
Comment #2
frega commentedUpdated patch attached. Includes a vpr-message for empty($definition['handler']).
Comment #3
oadaeh commentedThis patch does not seem to work for me. If I replace vpr w/debug, I get messages, but not w/vpr. I'm guessing these messages are supposed to be showing up in the devel debug message area, which I set to be the header. If I'm wrong, please enlighten me.
Comment #4
oadaeh commentedThere seems to have been a problem with the debug output (#1387934: Remove region support for vpr), which may be why I wasn't seeing the messages.
With that fixed, I now see the messages.
Is it necessary to repeat the class name twice? It seems to me something like
and
would be a little easier to read and understand.
A link to the documentation might help (http://drupal.org/node/542202#files).
Also, as long as you're at it, you might add a statement to clear caches after adding the files property.
Comment #5
dawehnerThanks for the work here, committed with the changes in #4