Hi! I'm using Drupal 6.22, Wysiwyg 6.x-2.4 and PHP 5.3.6.
Problem: when I attach a file when creating a node, I see the error: "warning: Parameter 2 to xmlsitemap_node_form_alter() expected to be a reference, value given in /home/drupal/www/includes/common.inc on line 2892."
Perhaps this is due to the peculiarities of calling call_user_func_array () in PHP 5.3.
Sorry for my bad english> _ <

CommentFileSizeAuthor
bug.jpg161.92 KBAyumuKasuga

Comments

Anonymous’s picture

Priority: Critical » Major

Your pictures also shows other modules having an issue with the node. Perhaps another module is creating the issue or it may your PHP version. I see

PHP 5.3 is not yet supported by Drupal 5.x, but is supported by Drupal 6.14 core and higher

from the system requirements page. So, I'm guessing this is could be a bug in xmlsitemap, Drupal core, or PHP but I don't know.

Anonymous’s picture

I found an example of what should be done to quiet this. at #360605-200: PHP 5.3 Compatibility. I don't know if it fits xmlsitemap or if you need to find a module that isn't providing a reference in the argument data that should be.

dave reid’s picture

This generally means something is invoking hook_form_alter() with an incorrect $form_alter parameter.

ailgm’s picture

I'm not certain whether this is the correct fix, but we've had to alter the function declaration to get around an error, changing it to:

function xmlsitemap_node_form_alter(array &$form, &$form_state, $form_id)

i.e. removing "array " from the second parameter.

Anonymous’s picture

@ailgm: Removing the declarative array from the parameter isn't the correct fix. You need to find what is sending the function an incorrect data type. If it isn't an array then xmlsitemap will not work properly. I suggest you try disabling modules to find the one or multiple ones that cause the issue and propose a fix for that/those modules.

ailgm’s picture

Thanks earnie - you're right. We looked further and found our problem in AdvGallery (http://drupal.org/node/1206096#comment-4763454).

dave reid’s picture

Status: Active » Closed (duplicate)