After I installed purl and kept getting this warning in all pages:

Warning: file_exists() expects parameter 1 to be string, array given in ctools_get_plugins() (line 247 of /var/www/drupal/sites/all/modules/contrib/ctools/includes/plugins.inc).

Line 247 at plugins.inc:

if (isset($cache->data['path']) && file_exists($cache->data['path'])) {

I looked in Purl,  purl.module line 958 and realizde PURL is using

  $info['path'] = array(
    'title' => t('Path'),

So i changed to

  $info['purlpath'] = array(
    'title' => t('Path'),

But I don't know if this change cause problems or not.

Comments

Advin’s picture

Causes WSOD on taxonomy term edit page when Spaces Taxonomy (7.x-3.0-alpha1) enabled.

idflood’s picture

Status: Active » Needs review
StatusFileSize
new377 bytes

I confirm it is still happening with the latest dev version. I've rerolled the patch in #0 since it had a wrong base. It is pointing to "/drupal/sites/all/modules/contrib/purl/purl.module" instead of "/purl.module".

batje’s picture

StatusFileSize
new897 bytes

this patch calls it path_processor and it also renames the actual object & filename in the include folder.

(i dont use the path purl processor, so cant tell if it works. this will probably break some features at least)

rafaelcaceres’s picture

Why rename object and filename?

sebas5384’s picture

StatusFileSize
new1.13 KB

@rafaelcaceres and I, figure out some new patch.

If you didn't configure a modifier path before applying this patch you will get a big error when you where creating some new Group.

So I think this patch will do the job :)

Thanks,
Sebas.

rogical’s picture

Error persistents after applying the patch at #5

Warning: file_exists() expects parameter 1 to be string, array given in ctools_get_plugins() (line 253 of /opt/development/test/sites/all/modules/ctools/includes/plugins.inc).

Anonymous’s picture

Status: Needs review » Needs work

I don't think this is the right fix, unfortunately, and I'll explain why. CTools uses that $cache->data['path'] key to find where the code implementing the module is, but instead it's seeing an array of PURL processor plugins, one of which happens to be called 'path', which is being passed into ctools_get_plugins().

I think this needs a bit more thought, to change how the plugins are implemented in PURL (and therefore Spaces OG). Have a read of the CTools advanced help info on creating plugins if you have time. I'll try to come up with something if I can, too.

Here's the output from my debugging (this is the $cache data at line 247/253 depending on your version of CTools):

stdClass Object
(
    [cid] => plugins:purl:processor
    [data] => Array
        (
            [processor] => Array
                (
                    [handler] => Array
                        (
                            [class] => purl_processor
                            [file] => purl_processor.inc
                            [path] => sites/all/modules/vendor/purl/includes
                        )

                    [module] => purl
                    [name] => processor
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [path] => Array
                (
                    [title] => Path
                    [handler] => Array
                        (
                            [class] => purl_path
                            [file] => purl_path.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => path
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [pair] => Array
                (
                    [title] => Path pair
                    [null_id] => 1
                    [handler] => Array
                        (
                            [class] => purl_pair
                            [file] => purl_pair.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => path
                        )

                    [module] => purl
                    [name] => pair
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [subdomain] => Array
                (
                    [title] => Subdomain
                    [handler] => Array
                        (
                            [class] => purl_subdomain
                            [file] => purl_subdomain.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => subdomain
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [domain] => Array
                (
                    [title] => Domain
                    [handler] => Array
                        (
                            [class] => purl_domain
                            [file] => purl_domain.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => domain
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [extension] => Array
                (
                    [title] => File extension
                    [handler] => Array
                        (
                            [class] => purl_extension
                            [file] => purl_extension.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => extension
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [useragent] => Array
                (
                    [title] => User agent
                    [handler] => Array
                        (
                            [class] => purl_useragent
                            [file] => purl_useragent.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => useragent
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

            [querystring] => Array
                (
                    [title] => Query string
                    [null_id] => 1
                    [handler] => Array
                        (
                            [class] => purl_querystring
                            [file] => purl_querystring.inc
                            [path] => sites/all/modules/vendor/purl/includes
                            [parent] => processor
                        )

                    [module] => purl
                    [name] => querystring
                    [path] => sites/all/modules/vendor/purl
                    [file] => 
                    [plugin module] => purl
                    [plugin type] => processor
                )

        )

    [created] => 1334049534
    [expire] => 0
    [serialized] => 1
)
Anonymous’s picture

This looks to be an issue with ctools due to a fix that went slightly awry: http://drupal.org/node/1371700#comment-5851864

Please ignore my previous comment on the plugin implementation. Hopefully an upcoming fix to ctools will fix this particular issue.

jaypark’s picture

patch at ctools worked for me http://drupal.org/node/1371700#comment-5854084

patch reverts those lines to prior state.

maustyle’s picture

Hi, I have the same error message after we moved our website.

Warning: file_exists() expects parameter 1 to be string, array given in ctools_get_plugins()

How can I manually revert those lines to prior state or fix the error manually?

Many thanks!

Jeff Burnz’s picture

Status: Needs work » Closed (duplicate)