Not sure if this is me or the module, but here is what is happening...

1) I login as admin.
2) When visiting the admin profile page, an acidfree node is created (node/44)
3) I create several additional albums at the ROOT LEVEL and select "other users can add photos"
4) I verify I see the admin user album and the other public albums by visiting /acidfree
5) I navigate to the admin user profile
6) There is some message about "3 root albums found...creating new node 45."
7) Acidfree changes the admin user album node and moves the other public albums UNDERNEATH the admin user gallery.

What is going on? Thanks.

CommentFileSizeAuthor
#1 no-admin-per-user-album.patch.txt450 bytesvhmauery

Comments

vhmauery’s picture

StatusFileSize
new450 bytes

hmmm. This sounds like bad juju. Is it safe to say that admin doesn't need a per-user album? Admin can post anywhere. How about I just disable the per-user album for admin? Here is a patch. Does this fix the problem for you?

Note that if you have per-user albums enabled, it will mean that each user will only get ONE album in the root directory.

vhmauery’s picture

Status: Active » Needs review
tom611’s picture

Thanks...I will see how this works and post back.

ONE user album per user is exactly what I want. Also, is there a way to turn off "allow others to post to this album" setting globally? I don't want users being able to enable this for their album and have other users posting in their albums as well. Thanks.

tom611’s picture

I meant to say disable "allow others to post..." setting for user albums only. Thanks.

tom611’s picture

Ok I applied the patch and that seemed to fix the admin issue. However, all users now see all other user's galleries when they navigate to /acidfree. For example, user 1 sees his album, user 2 album, user 3 album and all public albums. I don't seem to remember this happening before...

vhmauery’s picture

All users seeing all other albums when navigating to /acidfree is not what I changed... That is a node access issue, not an acidfree issue.

As for disabling the 'allow others to post to this album' feature, you have two choices. Use the FormAPI to get rid of it with another module (the right way), or delete the code from Acidfree (the wrong way).

tom611’s picture

All users seeing all other albums when navigating to /acidfree is not what I changed... That is a node access issue, not an acidfree issue.

Can you elaborate? It was working previously...not sure what I might have changed.

As for disabling the 'allow others to post to this album' feature, you have two choices. Use the FormAPI to get rid of it with another module (the right way), or delete the code from Acidfree (the wrong way).

How can I accomplish this via FormAPI...is there a specific module you recommend? Thanks.

vhmauery’s picture

/acidfree is the root album. It contains ALL other albums. What changed is now you have lots of albums in it (all the user root albums). The path that the users should browse to to see their albums is /user/acidfree. I suppose that if you didn't want them to see ANY others, you might be able to set up some strange node_access rules to restrict access to the root album. But this would probably mess up other things.

The formapi stuff that you want would be a custom module. All it needs to do is implement hook_form_alter and remove the offending element from the form. It should be a real easy one.

tom611’s picture

Here's the problem...

When a user goes to upload a photo, he sees ALL the user albums under PARENT ALBUM.

Also, when navigating to /user/acidfree, users get NOT AUTHORIZED message.

Thanks for helping me figure this out...I am starting to think the patch caused additional issues.

Axel_V’s picture

Hope I'm right here. Seems this issue is related to my problem:
I can create albums and add content to them. When accessing mySite/acidfree though I just get an empty page with an "Acidfree Albums" headline with the "view" tab open and an additional "edit" tab. In the log file it says: "acidfree/albums not found." I do get to the albums though by accessing them via their nodes. So the albums do exist but the acidfree overview obviously doesn't work. It doesn't matter whether I use admin account or a user account.

cowb0y’s picture

Am having the same issue as the previous poster, except that I don't receive any log message (I did edit the root album early on and changed the title).

Albums created and filled (via mass import) are created, nest properly, can be accessed normally via their node references, and appear in their parent albums, as long as the parent album isn't root (the node with parent ID of -1 in the acidfree_hierarchy table). The breadcrumbs display properly, and can be followed in either direction, except that when one reaches the root album, no children are displayed. The nodes can be repositioned in the hierarchy correctly (Root shows in the hierarchy, and is recorded properly if selected).

The random image block works properly, and selects images from all of the dependent albums, even though the root is specified, so that part of the code is working correctly.

I did at some point turn on per-user albums, then created the albums in question (as user 2). During debugging, I turned them back off, but it didn't resolve the issue. I tried setting the creating user IDs of the table nodes to 0, but that also didn't help.

Using ?=acidfree returns the correct root node (verified by the tables), and is the same node returned by clicking on the root breadcrumb.

I was having the same problem as the post starter, but no longer have it (I deleted the extra "root nodes" from the tables), and have not applied the patch given above.

I'll take a longer look at the code, but any guidance would be appreciated.

Jay

cowb0y’s picture

Forgot to mention that I'm running a clean install (4.7.2 patched to 4.7.3; first install of acidfree CVS).

cowb0y’s picture

Ok, found the error. The root node was created before I applied Update.php to add the 'share' column to the table, which must have prevented the root node record from being created in the acidfree table. So, even though it was present in the hierarchy, and the magic was working correctly, there was no actual acidfree item to reference.

So, if you have this problem, you need to create a record for the root node in the acidfree table (just copy from another album record, giving it the 'aid' of the first record in the acidfree_hierarchy table (the one with a 'parent' value of -1); then make sure the child album records are pointing to the correct 'aid' value in the acidfree_hierarchy table.

Jay

Axel_V’s picture

Thanks cowb0y. As I was luckily just playing around in my sandbox installation I reinstalled acidfree it and now it works. Well, sort of. Another problem occured:
The selected file /tmp/acidfree/imagemanipUVVJU4.gif could not not be uploaded, because the destination could not be found, or because its permissions do not allow the file to be written.
Solution for this: under files/images there should be a tmp folder. In my case the folder was named 'temp' (?). Rename to tmp and chmod 777.

Axel_V’s picture

Well I thought the problem was solved this way. But it isn't. The misteriously disappearing messages reappear. BTW: I can produce albums, upload images, view albums, etc... but still there is this message (see above) and when I want to delete photos I get the following message:
array_walk() [function.array-walk]: Unable to call photo() - function does not exist in /homepages/18/d126859316/htdocs/newSiteDevelopment/Drupal/includes/common.inc on line 509.

Axel_V’s picture

Well I thought the problem was solved this way. But it isn't. The misteriously disappearing messages reappear. BTW: I can produce albums, upload images, view albums, etc... but still there is this message (see above) and
Even though the acidfree test tells me:
Drupal 'Temporary directory' path set and permissions OK

Steel Rat’s picture

Having the same problem as Axel V and Cowboy. I reported this on another AcidFree issue, but my post is not showing up in My Recent Posts, nor in the Acidfree issues. Dunno what's going on there.

My installation was a fresh install of Drupal 4.7.3 and the latest AcidFree from the Modules 4.7.x page.

Had several table errors when trying to install, and ended up running the update script, even though this was a new install. While the tale errors went away, no albums are visible at the root acidfree level, just like described above.

Steel Rat’s picture

Just now I re-enabled Acidfree (was trying to use the image.gallery module instead, and now get this set of errors:


    * user warning: Table 'steelrat_drupal.acidfree' doesn't exist query: SELECT COUNT(aid) AS count FROM acidfree WHERE class <> 'album' in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.
    * user warning: Table 'steelrat_drupal.acidfree' doesn't exist query: SELECT count(n.nid) FROM node n INNER JOIN acidfree ON acidfree.aid = n.nid in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.

I hadn't done anything but disable acidfree yesterday, and re-enabled it today.

Steel Rat’s picture

Ok, I wiped my drupal database, and started over. Also wiped the Acidfree folders and downloaded CVS.

Re-installed Drupal 4.7.3.

Uploaded the CVS acidfree. Tried to enable it and get the following error:

Fatal error: Only variables can be passed by reference in /home/steelrat/public_html/drupal/modules/acidfree/class_image.inc on line 174

Wiped tha version of Acidfree and went back to the acidfree.module,v 1.62.2.53 2006/09/08 20:09:57 vhmauery Exp version downloaded from the 4.7.x modules page. And started back with the same original error whe trying to install it:

user warning: Table 'steelrat_drupal.acidfree' doesn't exist query: ALTER TABLE acidfree ADD COLUMN share TINYINT(1) NOT NULL DEFAULT '0' in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.

As I mentioned before. Something's broken...

Steel Rat’s picture

Ok, this time I did a COMPLETE wipe, totally clean drupal install. re-copied all the files from the downloads, and created a new database, so nothing of the previous installation existed.

Everything went fine, until I went into the Administer>Settings>Acidfree. Then I got the following error:


    * user warning: Unknown column 'share' in 'field list' query: INSERT INTO acidfree (aid, class, large, small, thumb, weight, share) VALUES (1, 'album', '', '','', -30, 0) in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.
    * user warning: Unknown column 'share' in 'field list' query: SELECT class,large,small,thumb,weight,visited,votes,share FROM acidfree WHERE aid = 1 in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.

Which is what started all this for me.

I will refrain from doing anything else until the author can provide some insight.

vhmauery’s picture

Steel Rat,

Acidfree CVS is not compatible with Drupal-4.7. It is only compatible with Drupal CVS HEAD.

Thanks for the heads up on the CVS warning though. Try re-installing from acidfree-4.7.tar.gz.

Steel Rat’s picture

Forgot to calrify that. I did re-install with version acidfree.module,v 1.62.2.53 2006/09/08 20:09:57, which is from the 4.7.x modules download page.

Steel Rat’s picture

Any update on this? I'm still hoping to be able to use this, but can't proceed due to the last error I posted above.

Thanks!

vhmauery’s picture

Status: Needs review » Fixed

Steel Rat,

The problem you noted in comment #20 has been fixed as another issue. Are there still outstanding problems in this issue?

Everyone:
Try the latest acidfree version 1.62.2.54 (it should be repackaged in a few hours or get it from CVS)

Anonymous’s picture

Status: Fixed » Closed (fixed)