After upgrading to the 7.x-1.0, I am running into an error. Ctools seems to be the cause of this. This cropped up after doing a mass contrib update, so I went back to a previous version of my site and started by only upgrading ctools. Immediately the error cropped up :-(. It seems to change depending on the version of PHP.
PHP 5.3.9:
Warning: file_exists() expects parameter 1 to be string, array given in ctools_get_plugins() (line 253 of [edited out]/sites/all/modules/ctools/includes/plugins.inc).
PHP 5.2.17:
Notice: Array to string conversion in ctools_get_plugins() (line 253 of [edited out]/sites/all/modules/ctools/includes/plugins.inc).
This error pops up on all pages using Panels. I am also no longer able to upload videos using the Video module due to the same error.
A similar issue was also noticed in RC2:
#1488748: Array to string conversion
The suggestion was to apply this patch to PURL:
#1497258-2: Warning: file_exists() expects parameter 1 to be string, array given in ctools_get_plugins()
Sadly this patch did not fix the error. I was using PURL 7.x-1.0-beta1 before and after the upgrade.
Is there anything else I can provide to help you track down this issue?!
Comments
Comment #1
rowbeast commentedI'm having the same issue, and am not using PURL.
php 5.3.10
I'm getting the file_exists() error as detailed above.
I too am happy to help track it down. if you need a schema dump or access to the error itself I'm happy to provide it!
Thanks for all the work you do!
Comment #2
Patricia_W commentedMe too ...
Comment #3
michaelschutz commentedJust additional info, if it helps...I got this error when upgrading ctools to 1.0 and had purl enabled. It was showing on all pages on the site. When I disabled purl through drush, the error went away.
Comment #4
noslokire commentedDisabling the PURL module also worked for me. Doesnt look to be a CTools error.
Comment #5
merlinofchaos commentedIf anyone could isolate what exactly purl is doing wrong to cause this, we could isolate that and validate the data so it would prevent errors and instead throw a watchdog notice or something.
Comment #6
emilianodelau commentedI had the same problem. When Spaces OG is activated (which requires PURL) then the error occurs.
Comment #7
Anonymous (not verified) commentedPURL is supplying a parent plugin type of 'processor', then each processor plugin is supplied as a separate entry within the data array, of which 'path' is one element, which itself is an array with its own path and description.
What I think should happen is that each plugin that CTools is able to see should have the path data within the data array. Maybe an outdated API implementation?
Here's what I found with a bit of debugging:
Comment #8
merlinofchaos commentedI'm not actually sure what this stdclass object is; the 'data' array that it contains looks like a list of plugins, but nothing I can think of in the plugins system creates this object. So it's hard for me to have any suggestions on this one.
Comment #9
merlinofchaos commentedOh wait, I see. That's the data cache returned by cache_get().
Comment #10
merlinofchaos commentedOH! And now i see what the bug here is. Oh. That's a very silly piece of code, and completely non-functional.
Comment #11
Anonymous (not verified) commentedSorry, yes, should've explained myself a little better! Apologies for the confusion.
That's the cache output from PURL's plugins in the cache_get(), as you've said. This is why I think that PURL's plugin implementation needs a bit of rewriting, but you'd know better than me.
Comment #12
merlinofchaos commentedOk, the cause of this bug is here: http://drupal.org/node/1371700#comment-5851864
Moving to that issue.
Comment #13
nvl.sateesh commentedHey guys for anyone still having this issue, here is what i did and it worked. I did not read the whole thread, if there is any solution already.
I just added !is_array($cached->data['path']) in line 253. So, here is what that condition now looks like:
previously it was
I think this is only temporary fix. Some code needs to be rewritten in PURL module as per comments in other threads...
Comment #14
BuFr commentedI had the same problem here but the ctools 7.x-1.x-dev update fixed it for me.
Comment #15
lalit774 commentedYou can fix by change this also.
Comment #16
aaronmacy commentedctools 7.x-1.x-dev update fixed it for me, too.
Comment #17
jawad.shah commentedyup ctools update also works for me
Comment #18
waqarit commentedI also found that problem But I just Update
module, and hence fixed the error....:)