Hi,
I just created a custom module with a custom style plugin. (and cleared caches..)
The style plugin is presented as an option in the views configuration form.
However, if I choose that option and submit, the option does not change at all.
I can successfully switch between "unformatted" and "slideshow" etc, but I cannot choose my own plugin.
So.. I suppose I did something wrong, and I would not be surprised if I find a nasty bug in my custom module.
Unfortunately, there is very little error reporting. Even the Drupal logs won't tell me :(
I can start digging myself, but it would be nice if I knew where to start (for putting my dpm() and friends)
And ultimately, we could turn this into a feature request, and implement some decent error reporting.
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThis most likely means you did not add the file containing the class to your .info file, so the class cannot be found because it is not in the registry.
Comment #2
donquixote CreditAttribution: donquixote commentedaaah, great, thanks!!
I almost always use xautoload for my modules, so I almost forgot this info file thing.
Should we not add a warning message "views plugin class not found", instead of just silently failing?
Comment #4
kobnim CreditAttribution: kobnim commentedI just wanted to second donquixote's suggestion, as someone who has tripped over this problem several times:
Comment #5
dawehnerIsn't there a message displayed if you enable the views debug messages in the settings, already?
Comment #6
donquixote CreditAttribution: donquixote commentedCan't say atm..
but I would not make this dependent on a setting.
Just throw an exception with the message, and let other modules (and settings) determine how this exception is going to be displayed.
I imagine the debug messages are for things that are not directly considered as a bug/error.
Comment #7
kobnim CreditAttribution: kobnim commented@dawehner,
Yes, you are correct, there is a message. Somehow I had missed it.
Comment #8
dawehner@donquixote
This might be possible in D8, but we simply can't change this behavior in 7.x-3.x, because people might have "broken" views which still works due to that somehow.