After installing the module, a Fatal error page appear, because in the line number 77, were this code:

$variables['options']['attributes']['class'][] = 'ctools-use-modal';

the problem is when the class is a string and not an array, and thats how the fatal error is triggered.

So the solution is converting the class to array before adding the ctools css.

CommentFileSizeAuthor
#1 ctools_automodal-Fatal-error_when_css_class_is_string-1715424-1.patch584 bytessebas5384
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ctools_automodal-Fatal-error_when_css_class_is_string-1715424-1.patch. Unable to apply patch. See the log in the details link for more information. View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

sebas5384’s picture

FileSize
584 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch ctools_automodal-Fatal-error_when_css_class_is_string-1715424-1.patch. Unable to apply patch. See the log in the details link for more information. View

Here is the patch to resolve this issue

Cheers,
Sebas.

sebas5384’s picture

Status: Active » Needs review

Status: Needs review » Needs work
rHOnDO’s picture

Patch did not correct the error for me.
Fatal error: [] operator not supported for strings in /sites/all/modules/ctools_automodal/ctools_automodal.module on line 77

Dave Reid’s picture

It would be good if you can track down the source of what's not setting an array for classes.

Hydra’s picture

Status: Needs work » Needs review

The erro is coming from admin_nenu_toolbar, there is a Case existing: http://drupal.org/node/1772766
Dave Reid already found it :D

sebas5384, can you confirm, that admin menu is causing your problem?

aldibier’s picture

This patch #1 works for me and I don't have installed admin menu.

jibize’s picture

Issue summary: View changes

I can confirm that updated to lasted current dev (admin menu 7.x-3.0-rc4+7-dev) solves the problem.

EDIT: Sorry my last comment wasn't very clear, Updated Administration menu to the latest dev (admin menu 7.x-3.0-rc4+7-dev) solved this issue for me, as mentioned by Dave in #1772766-4: Shortcut Toggle missing array() breaks CTools Automodal.

Dave Reid’s picture

Status: Needs review » Fixed

Marking as fixed as per recent comments.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.