* warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\ctools\includes\ajax.inc on line 522.
    * warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\ctools\includes\ajax.inc on line 526.
    * warning: array_unshift() [function.array-unshift]: The first argument should be an array in C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\ctools\includes\ajax.inc on line 530.

I get these warnings when I try to change the Style of a panel pane and try to choose the option "custom layout". This options doesn't work (literally nothing happens after a short spin of the ajax wheel). Selecting any other option works fine, also using predefined styles.

Panels and Ctools latest dev btw.

CommentFileSizeAuthor
#6 ctools ajax problem.JPG71.07 KBdddave
#2 debugging.JPG74.77 KBdddave

Comments

merlinofchaos’s picture

Hmm. That's odd, this one is working fine for me.

THe error you're seeing indicates that ctools_ajax_render() is being called with $commands not being an array. Can you do me a favor and put a vsm_trace() at that location, trigger the error, and show me where it's being called from? Also dsm($commands) and show me what's in it?

dddave’s picture

StatusFileSize
new74.77 KB

vsm_trace() only:

     *

      panels.module: ctools_ajax_render line 1199
      menu.inc: call_user_func_array line 348
      index.php: menu_execute_active_handler line 18

    *

      stylizer.inc: ctools_ajax_render line 151
      panels_renderer_editor.class.php: panels_stylizer_stylizer_style_settings_form line 1686
      form.inc: call_user_func_array line 372
      form.inc: call_user_func_array line 76
      modal.inc: ctools_build_form line 197
      panels_renderer_editor.class.php: ctools_modal_form_wrapper line 1174
      panels_renderer_editor.class.php: panels_renderer_editor->ajax_style_settings line 1054
      panels.module: call_user_func_array line 1197
      menu.inc: call_user_func_array line 348
      index.php: menu_execute_active_handler line 18

With dsm($commands) also in the next line:


    *

      panels.module: ctools_ajax_render line 1199
      menu.inc: call_user_func_array line 348
      index.php: menu_execute_active_handler line 18

    *
          o
            ... (Array, 1 element)
                +
                  0 (Array, 3 elements)
                      #
                        command (String, 13 characters ) modal_display
                      #
                        title (String, 39 characters ) Ausschnitt-Design für „frontrotor“
                      #
                        output (String, 3004 characters ) <form action="/acquia-drupal/de/panels/ajax/edi...
                            *
                              <form action="/acquia-drupal/de/panels/ajax/editor/style-type/panel_context%3Apage-frontpagenew%3Apage_frontpagenew_panel_context_2/pane/99" accept-charset="UTF-8" method="post" id="panels-edit-style-type-form"> <div><div class="no-float"><div class="form-item"> <label>Design: </label> <div class="form-radios"><div class="form-item" id="edit-style-default-wrapper"> <label class="option" for="edit-style-default"><input type="radio" id="edit-style-default" name="style" value="default" class="form-radio" /> Kein Design</label> </div> <div class="form-item" id="edit-style-stylizer-wrapper"> <label class="option" for="edit-style-stylizer"><input type="radio" id="edit-style-stylizer" name="style" value="stylizer" checked="checked" class="form-radio" /> Custom style</label> </div> <div class="form-item" id="edit-style-block-wrapper"> <label class="option" for="edit-style-block"><input type="radio" id="edit-style-block" name="style" value="block" class="form-radio" /> System-Block</label> </div> <div class="form-item" id="edit-style-naked-wrapper"> <label class="option" for="edit-style-naked"><input type="radio" id="edit-style-naked" name="style" value="naked" class="form-radio" /> No markup at all</label> </div> <div class="form-item" id="edit-style-rounded-corners-wrapper"> <label class="option" for="edit-style-rounded-corners"><input type="radio" id="edit-style-rounded-corners" name="style" value="rounded_corners" class="form-radio" /> Abgerundete Ecken</label> </div> <div class="form-item" id="edit-style-skinr-wrapper"> <label class="option" for="edit-style-skinr"><input type="radio" id="edit-style-skinr" name="style" value="skinr" class="form-radio" /> Skinr</label> </div> <div class="form-item" id="edit-style-stylizer:stil3-wrapper"> <label class="option" for="edit-style-stylizer:stil3"><input type="radio" id="edit-style-stylizer:stil3" name="style" value="stylizer:stil3" class="form-radio" /> stil 3</label> </div> <div class="form-item" id="edit-style-stylizer:style1-wrapper"> <label class="option" for="edit-style-stylizer:style1"><input type="radio" id="edit-style-stylizer:style1" name="style" value="stylizer:style1" class="form-radio" /> Style1</label> </div> <div class="form-item" id="edit-style-stylizer:teststyle1-wrapper"> <label class="option" for="edit-style-stylizer:teststyle1"><input type="radio" id="edit-style-stylizer:teststyle1" name="style" value="stylizer:teststyle1" class="form-radio" /> Teststyle</label> </div> </div> </div> </div><input type="submit" name="op" id="edit-submit" value="Weiter" class="form-submit" /> <input type="hidden" name="form_build_id" id="form-52cf892ea32234564929d3d4cc39c76f" value="form-52cf892ea32234564929d3d4cc39c76f" /> <input type="hidden" name="form_token" id="edit-panels-edit-style-type-form-form-token" value="4b305983137193836c28b2431f3271d4" /> <input type="hidden" name="form_id" id="edit-panels-edit-style-type-form" value="panels_edit_style_type_form" /> </div></form>
          o
            Krumo version 0.2a
            | http://krumo.sourceforge.net
            Called from C:\Users\David\Sites\acquia-drupal-site\acquia-drupal\sites\all\modules\ctools\includes\ajax.inc, line 523  
    *

      stylizer.inc: ctools_ajax_render line 151
      panels_renderer_editor.class.php: panels_stylizer_stylizer_style_settings_form line 1686
      form.inc: call_user_func_array line 372
      form.inc: call_user_func_array line 76
      modal.inc: ctools_build_form line 197
      panels_renderer_editor.class.php: ctools_modal_form_wrapper line 1174
      panels_renderer_editor.class.php: panels_renderer_editor->ajax_style_settings line 1054
      panels.module: call_user_func_array line 1197
      menu.inc: call_user_func_array line 348
      index.php: menu_execute_active_handler line 18

    *

      Missing settings cache.

I have no clue if I am using dsm($commands) the right way as I never used it before. If that was wrong I might need some guidance. See attached pic for "live" message and the krumo bar.

merlinofchaos’s picture

Can you update to the latest -dev? This looks like something I fixed maybe a week or two ago.

merlinofchaos’s picture

In any case, this:

stylizer.inc: ctools_ajax_render line 151

That code has changed, so definitely need to try newest to see.

kmv’s picture

I have this error too, it is very repeatable, although with the latest -dev I see the errors as:

    * warning: array_unshift() expects parameter 1 to be array, string given in /[...]/sites/all/modules/ctools/includes/ajax.inc on line 494.
    * warning: array_unshift() expects parameter 1 to be array, string given in /[...]/sites/all/modules/ctools/includes/ajax.inc on line 498.
    * warning: array_unshift() expects parameter 1 to be array, string given in /[...]/sites/all/modules/ctools/includes/ajax.inc on line 502.

Could this be a PHP v5.3 related problem? My dev system is running v5.3 and I have noted that the stricter type checking in v5.3 seems to be breaking things all over.

dddave’s picture

StatusFileSize
new71.07 KB

Tested with latest devs and I still am getting the same errors. I am NOT using php 5.3.

Of course these warnings are a nuisance but I am wondering what the correct behavior would be. As mentioned I trigger these warnings by chosing "Custom style" for a pane. After some ajax wheel turning nothing happens. What SHOULD happen?

Attached is the vsm/dsm output. Let me know what I can do to help.

kmv’s picture

What SHOULD happen is that a model dialog should open in which you can fill in the custom style details.

In my case, the modal dialog does open, but it does not populate the form - it just sits their spinning. However, clicking on the "Close Window" link in the top right corner does close the dialog. The errors show up when the Panel's window refreshes.

kmv’s picture

I have noticed that this bug seems to be breaking the module 'Tab Panels Style' - which adds new style options to a pane.

dddave’s picture

re #7

That would make sense.

re #8

Not using Tab Panels Style either. Just for the record.

kmv’s picture

Please ignore #8 I just noticed the status report saying that "Panels is operating in Legacy mode" because Tab Panels Style doesn't report compatibility with the 2.0 API. Sorry for any confusion.

I still have the original problem when I disable the Tab Panels Style module.

dddave’s picture

merlinofchaos’s picture

Status: Active » Fixed

Ok, I feel kind of dense for missing this. The 'step' was getting set improperly and skipping the step where you choose a style base, which really does not work. At all.

Checked in a fix. Thanks for the reports on this one! Would hate to have shipped with this broken.

Status: Fixed » Closed (fixed)

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