Active
Project:
CTools Auto-modal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Sep 2012 at 17:04 UTC
Updated:
12 Sep 2012 at 17:04 UTC
I ran into a problem with the media.module where certain menu items "Select Media", "Remove Media" are defined with paths as empty strings since they are only accessible through Javascript. At issue is the ctools_automodal_is_path_modal() function which evaluates them with this statement:
return (bool) preg_match($modal_paths_regex, $path);
The problem is that if there are no modal paths defined then $modal_paths_regex matches $path (since they are both empty) and a bunch of JS is added which causes trouble.