Hello, I just did a fresh install of Drupal 5.1, and setup multi-sites for various clients, whereby additional modules are in `sites/all/modules/`.
- I then installed a fresh copy of Acidfree (May 21, 2007), and checked "Per user albums" in the settings.
- Furthermore, I allowed authorized users to 'create', 'edit own', and 'get a per-user album' for Access Controls.
- Finally, just to be safe, I also allowed authorized users to 'create containers', 'create categories', and 'edit own categories'.
- I then setup a test authorized user so I could play around with Acidfree.

This is where the errors start, first off, when I try to create an album as the test user, I get a PHP warning:

warning: array_keys() [function.array-keys]: The first argument should be an array in /path_to_drupal/drupal/sites/all/modules/acidfree/acidfree.module on line 563.

I know this is just a warning, and I can disable it in error reporting, but still for 'nice code', this should be dealth with (ex: add an 'is_array()' call) ... but I thought I'd leave it for now because it seems to be a symptom of the real problem.
When I go to actually add an album and click 'submit', I get another error:

An illegal choice has been detected. Please contact the site administrator.

So, when I log in as the site admin, and take a look at the logs it shows:

Illegal choice 3 in Parent element.

Something else that's curious is when I go to add an album, there is no dropdown for 'Parent album'. A couple weeks ago I had downloaded and installed it all, and it worked fine, and had 'Parent album' and all that in there - but now it doesn't.
- So I went back in to 'Access Control' and gave all privileges to the authorized user (so can now do 'acidfree mass import', and 'upload to any album', in addition to the others that were already set).
- Now when I go to add an album as the authorized user, I don't get the PHP warning, nor the 'illegal choice' error. However, there isn't a "Parent album" dropdown either so I guess I can't do nested albums - or maybe I was just mistaken about the 'Parent' thing.
Anyway, I can get around it, but then I end up allowing all users the ability to 'upload to any album', which I don't want.

Thoughts anyone?

Comments

vhmauery’s picture

Status: Active » Closed (duplicate)
Brantone’s picture

Yeah, I read through that error/bug and wasn't sure if my symptoms reflect the same underlying problem that that bug describes since the errors are completely different.
That error describes it being a problem in the 'node' module, whereas mine is strictlying with the 'acidefree' module; furthermore, I'm not experiencing any MySQL problems.

So am I to understand the same problem is causing numerous different errors? I'll try using the latest CVS code.

vhmauery’s picture

Status: Closed (duplicate) » Active

It appears that I did not get enough sleep over the weekend. This is a completely different issue. Sorry.

I did notice in re-reading your post that you said you enabled categories. This is possibly bad. There have been some problems reported with Acidfree vs. Categories. Acidfree works great with Taxonomy, but may have issues with Categories. Try disabling cateogories.

I just created a new install. I added a new user, gave him permission to create albums, images, and get a per-user album. As the user, I went to user/acidfree and got my album. Then I added an album inside of that one.

I have not see any errors or warnings. Did I try to recreate the error wrong?

When you say 'try to create an album as a test user, was it node/add/acidfree or node/add/acidfree/nnn where nnn was the nid of the parent album? Did the user already have a per-user album at that point?

The initial warning messages you are seeing are from a filter function that filters out albums from the parent selector that are not available to that user for posting items to. When giving a user the permission to 'post to any album', it bypasses this filter step.

For root albums (per-user albums and the main acidfree root album) there is no parent selector because they are the top album.

Brantone’s picture

So apparently I do have the latest CVS version ... at least in taking a look at the the diff using ViewCVS I'm at version 1.133.2.23, Mon May 21 05:15:07 2007, and the problem still exists. In that error you linked to when you mentioned it's duplicated, it says the issue was fixed and committed to CVS at 5:15 ... which I have and I'm still getting the error ... therefore, it's not a duplicate, just so you know.

I'm going to continue digging through the code and see what I can find.

I just want to make sure of 2 things:
1.) Based on what I've described so far, is there anything I'm missing as to why this shouldn't work?!? Ex: a module setting, or anything??
2.) Should there be a 'Parent album' dropdown when creating/editing an album?? Because currently there is nothing of the sort.

Perhaps these 2 things are symptoms of the same issue, like is there something I should tweak in Categories/Containers?? I've just got the default setup of the Category module, the basic install and no tweaks or setting edits.

Thanks ... time to go code diving.

Brantone’s picture

haha ... looks like we were both posting at the same time ...

K, I'll try playing around with Categories ... I have suspected this could be a cause. The admin user could create an album no problem, but when I went in to take a look something just didn't seem right (I have to investigate this more before I comment on it). When I gave permissions to the authorized users to 'upload to any album', I could create an album without a problem; however, there didn't seem to be a link to the user that created it. So yeah, your suspicion could be correct, I'll take a look ...

The thing is, when I have the 'Category' folder loaded (and listed in 'Modules', but not yet installed), 'Taxonomy' says that it depends on 'Category' ... and 'Acidefree' depends on 'Taxonomy'.

Anyway, like I said I'll keep taking a look ...

Brantone’s picture

So, a completely fresh install of Drupal 5.1, in 'Modules' it says that the 'Taxonomy' module depends on 'Category' (which is missing) ... I thought 'Taxonomy' was a core system module.

Actually, I think it might be ... either way, apparently when 'Category' is installed it edits the 'Taxonomy' module's dependencies ... so you've got 1 module editing the dependencies of another. By default, the 'Taxonomy' module is in the base module dir (`/modules/taxonomy/`) ... but to do multi-sites "properly", I put 'Category' in `/sites/all/modules/` ... so if I want one site to use 'Category' and another to not, I'm pretty much screwed ... my goodness!!

K, so that's a problem with 'Category' so I'll go over there and yell at someone ... as for 'Acidfree', it looks like the suspicion is prooving correct, but I'll still see if there's a work around.

Brantone’s picture

Alrighty, so latest update:
- Removed 'Category', and fixed 'Taxonomy' to not be dependent on 'Category':
Category had renamed some files in 'Taxonomy', but luckily kept the originals, so just swapped file names around and restored the originals.

Re-installed it all ... and works fine, finally.

Moral of the story: 'Acidfree' and 'Category' don't play well together!!
Perhaps this should be thrown up somewhere as a "just so you know" type of note.

I'm tempted to leave this as an open issue since there are still problems with the two and hopefully something can be worked out.

Brantone’s picture

K, I'm obviously talking to myself, but hopefully this will help someone else ... as despair.com says "t could be that the purpose of your life is only to serve as a warning to others."

Anyway, now that I know it's a Acidfree-Category problem I've found a few other threads and forum posts on the issue. Although none of them really provide a solution now I know what to look for, whearas before I thought it was just Acidfree. I really like the functionality that 'Category' provides so would prefer to use it, but if there is an alternative that doesn't break things, that'd be sweet too.

vhmauery’s picture

Status: Active » Closed (duplicate)

Okay. If this really is just the Category incompatibility issue, then this is a duplicate of http://drupal.org/node/136420

Brantone’s picture

I believe it could be ... just different symptoms.