Hello
i get this notice using page manager wirh PHP 5.4

Notice: Array to string conversion in page_manager_render_operations() (line 1211 of /var/www/.../html/sites/all/module

regards

Comments

merlinofchaos’s picture

This may be fixed in -dev. Can you please try and see?

sandergo90’s picture

Having the same problem. Tried updating to dev branch but no success still the error message.

Ashlar’s picture

Status: Active » Postponed (maintainer needs more info)

In order to assist you we need additional information. Please review the drupal.org/node/571990 'Submission Checklist' for the type of information we are looking for. If we cannot duplicate your problem we cannot fix it, so tell us the steps necessary to recreate the problem. When you post information, please change the status back to active. Thanks.

mneuhaus’s picture

StatusFileSize
new520 bytes

The main issue seems to be that $attributes['class'] is now an array instead of a string.
I've attached a patch to fix this.

rogical’s picture

Status: Postponed (maintainer needs more info) » Needs review

Notice: Array to string conversion in page_manager_render_operations() (line 1211 of /opt/development/yourhelps/sites/all/modules/ctools/page_manager/page_manager.admin.inc).
...

git apply -v page_manager.admin_.diff
Checking patch (clipboard) ...
error: (clipboard) : No such file or directory

I solved this error by apply this patch manually.

rogical’s picture

Version: 7.x-1.0-rc2 » 7.x-1.0
audster’s picture

Version: 7.x-1.0 » 7.x-1.0-rc2
Status: Needs review » Postponed (maintainer needs more info)

I was getting this error on page creation, used above fix, error gone!

Thanks!

ctools 7.x-1.0

rellimevad’s picture

Version: 7.x-1.0-rc2 » 7.x-1.0
Status: Postponed (maintainer needs more info) » Needs review

Patch in #4 worked here as well. PHP 5.4.2 and ctools 7.x-1.0.

tim.plunkett’s picture

Status: Needs review » Needs work

Theoretically, the class part of attributes should ALWAYS be an array.
But in any case, I think we'd be better off using drupal_attributes() here.

Anonymous’s picture

StatusFileSize
new727 bytes

Path for fix using drupal_attributes() as noted on #9

rogical’s picture

git apply -v issue-1492274.patch
fatal: corrupt patch at line 14

Can't apply patch on 7.x-1.0

Anonymous’s picture

I dont why it says it is corrupt. Please look at the code on the diff and make the changes manually?
May be if you post a similar patch, it will not be corrupted?

Thanks!

pfrenssen’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs work » Reviewed & tested by the community
StatusFileSize
new674 bytes

Patch in #10 fixes the problem, but indeed does not apply cleanly.

I rerolled the patch from #10 against the latest 7.x-1.x, this one should apply properly.

fishfree’s picture

The patch works! Thank pfrenssen!

Letharion’s picture

Status: Reviewed & tested by the community » Needs work

The patch in #13 misuses drupal_attributes and creates nonsensical class names like "0=>operations".

deepbluesolutions’s picture

I confirm the notice disappears after applying patch in #13. Dont understand the issue raised by #15, and have yet to see any other side effects, so far...

pfrenssen’s picture

I cannot replicate the exact problem from #15 but I can see where it goes wrong. I rerolled the patch from #10 without really looking at the code, my apologies. I will create a better patch.

pfrenssen’s picture

Hehe it seems like someone has been looking at this before, I found this leftover debug code in the function:

      if (!is_array($attributes['class'])) {
        dsm($attributes['class']);
      }
pfrenssen’s picture

Status: Needs review » Needs work
StatusFileSize
new1.16 KB

This should work a bit better. Mind that I wrote this blindly, I'm not using Page Manager and don't know how to replicate this problem. I just did the reroll a few weeks ago when I was quickly evaluating Page Manager for a project.

I tried to cover both the case that $attributes['class'] is supplied correctly as an array, and that it is not - in which case it disregards it.

pfrenssen’s picture

Status: Needs work » Needs review

I value the opinion of the test bot.

wOOge’s picture

Status: Needs work » Needs review

Just tried the Dev from Aug 3 2012, and still getting these errors.

pfrenssen’s picture

@wOOge, that's normal since this issue has not yet been resolved, so it is not available in dev yet. Only issues that are marked as "Fixed" are. Maybe if you have some time you can try if the patch in #19 solves the problem for you?

merlinofchaos’s picture

Committed #19 to D7.

tim.plunkett’s picture

wOOge’s picture

@pfrenssen — oops my bad. The latest release 7.x-1.1, Aug 9, does solve the problem. Thank you!!

mamanerd’s picture

Patch from #19 works for me, thanks @pfrenssen!

Status: Fixed » Closed (fixed)

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