Closed (fixed)
Project:
Views Datasource
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
17 May 2010 at 05:37 UTC
Updated:
23 Jun 2010 at 21:10 UTC
When I try to use Views Datasource and create a new view display, style: XML data document, I get several error messages. I get the first warning when trying to preview the view display or visit its path. The second set show up when first adding the display. I can't seem to get any derivation of XML to work.
warning: Parameter 1 to theme_views_views_xml_style() expected to be a reference, value given in \includes\theme.inc on line 617.
* warning: Parameter 3 to views_ui_build_form_state() expected to be a reference, value given in \site\modules\views\includes\admin.inc on line 1603.
* warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in \includes\common.inc on line 3769.
* warning: Invalid argument supplied for foreach() in \site\modules\views\includes\admin.inc on line 1539.
* warning: Attempt to assign property of non-object in \site\modules\views\includes\admin.inc on line 1610.
* Display "Page" uses a path but the path is undefined.Running PHP 5.3.1
Drupal 6.15
Views 6.x-2.10
Views Datasource 6.x-1.x-dev (2010-May-12)
Comments
Comment #1
nicknickoli commentedI'm wondering if this is related to running on PHP 5.3 with the reference error? See http://drupal.org/node/452384... Deleting this ampersand got rid of the warning but I'm wondering if references are needed further down in the themeing or? Thanks for any advice.
views_views_xml_style.theme.inc line 25, Changed:
function theme_views_views_xml_style(&$view, $rows = array(), $attachment = NULL, $options = array()) {
To:
function theme_views_views_xml_style($view, $rows = array(), $attachment = NULL, $options = array()) {
Comment #2
allisterbeharry commentedI'm pretty sure this is a 5.3 issue since I do development on 5.2.6. 5.3 changes how parameters are passed to functions using call_user_func_array - the default is now pass-by-reference with & signifying pass-by-value, as was discovered in #452384 The consensus is that removing the ampersand does no harm for any PHP > 5 so I'll make all the changes and commit it tonight. Thanks a lot for catching this.
Comment #3
allisterbeharry commentedok according to this http://drupal.org/node/360605 there is at least outstanding issue with Drupal core and PHP 5.3 which I've just encountered. I can't get Drupal 6.16 to run on 5.3 without a patch. What version of Drupal core are you running on 5.3? I'm considering marking this as won't fix since the recommended PHP version for Drupal is still 5.2.
Comment #4
nicknickoli commentedYikes, hopefully it's not that far off. I'm running Drupal 6.15 and did go through a Views update for the Views errors. If your fix deals with recommendations by PHP and it's just a coding convention, it seems worth checking in the code update? I'm working on a couple other issues with Atom formatting and will open a couple tickets. Thanks for your help so far!
Comment #5
allisterbeharry commentedI removed all unnecessary &s from the code so it should now be compatible with PHP 5.3.x.