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.

CommentFileSizeAuthor
#9 acidfree.patch_0.txt1.21 KBwpd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vhmauery’s picture

I cannot reproduce this. Can you give me more information? Are you using the most recent version?

fallacious’s picture

Status: Active » Closed (fixed)

I updated both filemanager and acidfree, then ran update.php.

All better now. Oops, and thanks.

fallacious’s picture

Status: Closed (fixed) » Active

My 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.

wpd’s picture

I 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:

node/63/contents%26page%3D0

I am using the latest from CVS for Drupal and acidfree. (I just updated everything to make sure.)
PHP 4.3.10

wpd’s picture

On my test site that runs on my local machine I do not have this problem with PHP 5.

wpd’s picture

Title: urldecode() logged error » acidfree submit not compatible with path.module (urldecode() error)

Sorry 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.

wpd’s picture

When 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.

wpd’s picture

I 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

wpd’s picture

Status: Active » Needs review
FileSize
1.21 KB

I 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.

wpd’s picture

Is anyone else experiencing this?

geofs’s picture

I do have the same problem. I can't provide more info but your patch works. at least the warning disappear. thanks.

wpd’s picture

Status: Needs review » Reviewed & tested by the community

changing status based on previous review

mkoby’s picture

I'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.

vhmauery’s picture

Status: Reviewed & tested by the community » Fixed

A fix for this bug has been committed to CVS. It should appear in the tarball packages within 12 hours or so.

vhmauery’s picture

Status: Fixed » Closed (fixed)