With both Quicktabs and Panelizer installed, adding or editing an instance gives a 500 error:
PHP Fatal error: Call to a member function optionsForm() on a non-object in /media/sf_nextgen/sites/all/modules/contrib/quicktabs/quicktabs.admin.inc on line 317
It looks like Panelizer does something to nodes that Quicktabs doesn't like so the workaround for me was to disable nodes on Quicktabs since I don't need it:
diff --git a/sites/all/modules/contrib/quicktabs/quicktabs.admin.inc b/sites/all/modules/contrib/quicktabs/quicktabs.admin.inc
index ea320a5..4d9b5c7 100644
--- a/sites/all/modules/contrib/quicktabs/quicktabs.admin.inc
+++ b/sites/all/modules/contrib/quicktabs/quicktabs.admin.inc
@@ -306,15 +306,17 @@ function _quicktabs_form(array $tab, $qt) {
ctools_include('plugins');
$contents = ctools_get_plugins('quicktabs', 'contents');
foreach ($contents as $name => $info) {
- if (isset($info['dependencies'])) {
- foreach ($info['dependencies'] as $dep) {
- // Do not load the options form for any plugin that is missing dependencies.
- if (!module_exists($dep)) continue 2;
- }
+ if ($name !== 'node') {
+ if (isset($info['dependencies'])) {
+ foreach ($info['dependencies'] as $dep) {
+ // Do not load the options form for any plugin that is missing dependencies.
+ if (!module_exists($dep)) continue 2;
+ }
+ }
+ $tabtypes[$name] = $name;
+ $content_provider = quick_content_factory($name, $tab);
+ $form = array_merge_recursive($form, $content_provider->optionsForm($delta, $qt));
}
- $tabtypes[$name] = $name;
- $content_provider = quick_content_factory($name, $tab);
- $form = array_merge_recursive($form, $content_provider->optionsForm($delta, $qt));
}
$form['type'] = array(
Obviously, this fix doesn't work for everyone, but it's a start.
Comments
Comment #1
a.milkovskyI just added the check and it fixed for me
Comment #2
socialnicheguru commentedwas #1 done in quicktabs or panelizer
Comment #3
papagrandeThe fix in #1 would be in quicktabs.admin.inc.
Comment #4
broeker commentedJust verifying that this error still exists, and that the code posted in OP fixes the issue (albeit by handicapping Quicktabs). I also don't need nodes but it would be great to find a real fix. (Fix in #1 did not work on this end).
Comment #5
broeker commentedScratch that; the fix does initially eliminate the Server 500 error but it does not allow me to add a QT instance to panelizer -- it throws this AJAX error:
and then the Server 500 error returns when I visit the Panelizer content settings screen. Back to the drawing board.
Comment #6
broeker commentedHere is some progress, there are actually two things going on in my case:
1. The fix from #1 does in fact work
2. But not with the latest version of Ctools dev -- see here:
http://drupal.org/node/1910434
I manually applied the fix from #1 in this post, and #3 in the post above and my QT/Panelizer setup is working again.
Attached patch seems like a harmless fix to the first problem -- I'm not clear if the other issue should actually be a Ctools fix, or if there is something in QT that should be fixed.
Comment #7
socialnicheguru commentedthis patch is not correct
Comment #8
broeker commentedBah, I'm not sure what happened there here is the correct patch.
Comment #9
jason.fisher commentedPatch worked here with the latest dev.
Comment #10
socialnicheguru commentedseems it is in the feb 12 dev version
Comment #11
netw3rker commentedThis is in fact already applied. Thanks for contributing everyone!