First of all, the new acidfree module (Drupal 5) looks really great (relying on image & views modules)!

So, I created an Album, say Album Foo, (as child of the root album), then imported several images into the root album, then decided to move these pictures from the root album into the Foo album.
I went to the "Album contents" page of the root album - got a list of the pictures plus the Foo album. Then (without thinking too much, of course), I clicked "check all" and then "move to Foo album".

That means I (unintentionally) moved the Foo album into itself.

The Foo album had the nid 2, and when I went to node/2, I got a "Max. execution time exceeded" PHP error. The query log showed that the query "SELECT t.tid, t.* FROM term_data t INNER JOIN term_hierarchy h ON h.parent = t.tid WHERE h.tid = 2 ORDER BY weight, name" was executed about 200 times, with no results, as acidfree has deleted tid 2 when the album was moved.

So, acidfree should prevent the user from moving an album into itself, as the above behaviour can't be corrected without directly modifiying the database or deleting the node.

Acidfree doesn't seem to prevent this, what I would call a bug.

Comments

vhmauery’s picture

Status: Active » Fixed

This is something I worked on in the 4.7 version, but with the rewrite it had slipped my mind. I have committed a fix for 5.0 to CVS. There is still one more place you might be able to shoot yourself in the foot. That would be in the album contents view, you can select an album and then say move to another album with the selector at the top or bottom. Since those selectors are not filtered, you could CHOOSE itself (or one of its descendants) but it shouldn't let you do it. I think there is some code in there to check for that on submit, but I am not sure it works. I am in the middle of some other album contents changes so I wasn't able to test that for now.

vhmauery’s picture

Status: Fixed » Closed (fixed)
bbking’s picture

a similar problem to this is with that move form in the album contents view users can move their photos into other peoples albums, they should not even be able to see other people's albums much less move items into them.

vhmauery’s picture

Please open a new issue to track that.