Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Submitting from the "album contents" pages (and perhaps from other places, too) triggers the following log message:
urldecode() expects parameter 1 to be string, array given in /.../modules/path.module on line 149.
Comment | File | Size | Author |
---|---|---|---|
#9 | acidfree.patch_0.txt | 1.21 KB | wpd |
Comments
Comment #1
vhmauery CreditAttribution: vhmauery commentedI cannot reproduce this. Can you give me more information? Are you using the most recent version?
Comment #2
fallacious CreditAttribution: fallacious commentedI updated both filemanager and acidfree, then ran update.php.
All better now. Oops, and thanks.
Comment #3
fallacious CreditAttribution: fallacious commentedMy apologies, I spoke too soon.
Filemanager and Acidfree are at the most recent version. The log message is triggered when changing the category from the album view or probably by submitting any change at all. In case it matters, I use the friendselectric theme and also run the taxonomy_access module.
There's one of these message per item on the album view.
I wonder if this is a bug in the drupal core, though. I note that in the album view, I see the headings for Comment settings and so on, but the headings are not expandable. Anyway, the path module seems unhappy with whatever it's getting fed.
Comment #4
wpd CreditAttribution: wpd commentedI can confirm this error. I get it submitting "album contents". The number of images and error messages are equal.
The final url looks like this:
I am using the latest from CVS for Drupal and acidfree. (I just updated everything to make sure.)
PHP 4.3.10
Comment #5
wpd CreditAttribution: wpd commentedOn my test site that runs on my local machine I do not have this problem with PHP 5.
Comment #6
wpd CreditAttribution: wpd commentedSorry for all the posts. Here is some more information:
-The problem is related to the path module being enabled. The acidfree album does not have to an alias.
(i.e. photos -> node/16)
-This is true for PHP5 or PHP4. (Forget the last post ;))
-Everytime I move a photo to a different album an empty alias is created. It points the node (node/25) to ''.
For some reason, the $node->path is set to Array when you move a photo. This causes the path.module to add a new path alias and create warning message.
Comment #7
wpd CreditAttribution: wpd commentedWhen you install the devel module, the urldecode error goes away. However, the bad path alias is still created.
This problem does not occur during a normal edit of the node. It is particular to the 'album contents' functionality.
Comment #8
wpd CreditAttribution: wpd commentedI found the problem, but I do not know how to fix it. acidfree_album_contents creates a form that allows you to edit/move any item in the album. In doing this, multiple calls to node_load are called. This function in turn calls hook_nodeapi. hook_nodeapi is called for the path module. The path module alters the form to add the path specific fields.
When saving the information, the node was getting populated with all fields from the form. The problem is several of these fields are arrays because of the way the form is created. The path field is what is causing this bug, but I wonder if it may cause problems later with other hook_nodeapi .
# title->Training
# body->Training
# small->
# large->
# thumb->0
# class->album
# parent->16
# weight->0
# checked->0
# nid->20
# menu->Array
# path->Array
# attachments->Array
# ptype->
# og_nodeapi->Array
Comment #9
wpd CreditAttribution: wpd commentedI asked on the development mailing list and there was not a consensus on how to fix this, so I picked my own.
In acidfree_album_contents_submit, I prune the form so that the 'uninitialzed' values are not sent to node_save.
This fixes the problem for me. If a node already has a path assigned, it still works.
Comment #10
wpd CreditAttribution: wpd commentedIs anyone else experiencing this?
Comment #11
geofs CreditAttribution: geofs commentedI do have the same problem. I can't provide more info but your patch works. at least the warning disappear. thanks.
Comment #12
wpd CreditAttribution: wpd commentedchanging status based on previous review
Comment #13
mkoby CreditAttribution: mkoby commentedI'm running the CVS version of acidfree and filemanager, and I'm still getting this error. Are there any compatability issues with certain modules?
I'm also running drupal 4.7.2. So that might be it as well.
Comment #14
vhmauery CreditAttribution: vhmauery commentedA fix for this bug has been committed to CVS. It should appear in the tarball packages within 12 hours or so.
Comment #15
vhmauery CreditAttribution: vhmauery commented