hi,
the referencing node fields had not been shown and i got the error Parameter 1 to theme_node_widget_element() expected to be a reference, value given in /var/www/drupal6/includes/theme.inc on line 656. on node creation form.
i solved the problem by removing & sing in
// line 21 of node_widget.theme.inc
//function theme_node_widget_element(&$element) {
function theme_node_widget_element($element) {
...
}
i'm using latest php on ubuntu.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | node_widget-php-5.3.patch | 4.25 KB | lightweight |
| #3 | 891234.patch | 605 bytes | freelock |
Comments
Comment #1
jaxpax commentedExperiencing the same thing. Is this bug still active, which is surprising if the only thing that needs to be done is removing the &, like described by takbar?
Comment #2
freelockHitting this also on one server. Turns out to be a PHP 5.3 compatibility issue -- PHP 5.3 complains and won't execute this theme function, rendering the entire module useless.
Because the function does not modify the argument, it doesn't need to be passed by reference, so removing the reference should not break anything in older PHP versions.
Comment #3
freelockPatch attached. Can somebody test and commit?
Comment #4
spuky commentedThe Patch is fixing the issue for me...
I also think it should not harm older versions
but haven't done any testing with older php versions..
Comment #5
spuky commentedthere are more PHP 5.3 problems...
in nodewidget/modules/content.node_widget.inc
function content_node_widget_is_empty(&$form, &$form_state)
should be
function content_node_widget_is_empty($form, $form_state)
same in nodewidget/modules/node.node_widget.inc
function node_node_widget_is_empty(&$form, &$form_state)
should be
function node_node_widget_is_empty($form, $form_state)
maybe more .... right now I have not the time to build a patch but maybe sombody wants to know...
Comment #6
ratinakage commentedHi,
I went through the PHP files mentioned above and made the suggested change every time I saw an '&' in the function header. I'm a beginner in PHP so hopefully that was the right thing to do. I had to change the following three files:
node_widget.theme.inc - (This only fixed the problem on the edit page. The two below fixed it for clicking save.)
node.node_widget.inc
content.node_widget.inc
I've checked and the above fixes are not in the 6.x-1.x-dev branch.
Thanks!
Comment #7
lightweight commentedI've had to fix this for a customer site, too, and I've got a full patch for the module (6.x-1.0-beta4). Update 18 Oct 2013: this patch creates some other problems upon further testing.
Comment #8
lightweight commentedOk, further testing suggests that this patch I submitted isn't a workable solution. I do not suggest using it! I'm moving to the current devel version to test it... Update: using the current (1 Oct 2013) dev version addressed my problems.