If the plugin definition for an export UI plugin is broken, then the output still renders but doesn't work properly.
This is because ctools_export_ui_switcher_page() doesn't check that it managed to load a plugin before trying to get the handler class for it. ctools_export_ui_get_handler(NULL) returns a ctools_export_ui object with some default properties populated, which then attempts some output, which obviously doesn't work at all.
This code demonstrates the problem:
ctools_include('export-ui');
$plugin = ctools_get_export_ui('bananas');
// Correctly gets NULL:
var_dump($plugin);
$handler = ctools_export_ui_get_handler($plugin);
// Gets a broken handler, which will attempt to display.
var_dump($handler);
Patch coming.
Comments
Comment #1
joachim commentedComment #2
chris matthews commentedThe 9 July 2015 patch to export-ui.inc does not apply to the latest ctools 7.x-1.x-dev and if still applicable needs to be re-rolled.
Comment #3
shubham.prakash commentedRerolled #1
Comment #4
joelpittetThanks @joachim et al, I've tweaked the patch to shortcut earlier but the committed code does the same thing as the original patch.