Hi,

I have been tinkiering with the latest version of Acidfree and found what I belive to be a bug. I am having trouble creating "Child" albums inside other albums. I have been manually editing the "Accid_Free" hierary table to make them come out right.

When I click inside an existing album and select the "Add Album" option my new album gets created but I get the following warning.

Found 2 Acidfree root albums, new root is node 68

The album is created inside of my "Root" album instead of one of the 2nd tier albums. Also, an extra album is created with the same level as the first.

When i create another album inside the root node, I get a pair of alubms created my prevous root is moved underneath the newest album. Am I reading somthing wrong?

I hope this explains things well, if not ask and I'll go into more detail.

CommentFileSizeAuthor
#9 acidfree_parent.patch796 bytesvhmauery
#6 acid_test.JPG90.81 KBgte451f
#3 acidfree_error.JPG60.61 KBgte451f

Comments

vhmauery’s picture

Status: Active » Closed (fixed)

You can't file a bug against the project when you are manually editing the sql tables. Acidfree makes a few assumptions about the table (and it can, since it is the only thing writing to it) and one of those assumptions is that there is only one root. You must have created another root while tinkering.

To create an album in root (or an album you don't own) you just go to node/add/acidfree/album and select the parent album (it defaults to root). I know the links aren't there, but that doesn't mean you can't do it. :)

I know this may seem like a security issue and it is, albeit very minor. I just haven't figured out how to fix it yet.

gte451f’s picture

Thanks for getting back so quickly. I should clarify, I didn't go in and edit the sql tables until I saw that a Root album was being created each time I filled out the form. Also, I did not notice a "parent" drop down when creating an album. I will wipe it out and try it again later. If problems persist, I'll post a screen shot of what comes up on my install.

gte451f’s picture

Status: Closed (fixed) » Active
StatusFileSize
new60.61 KB

I wanted to follow up with more details as to the problem I am having.

I wiped out my previous install and started fresh. I should say that I have issues with filemanager preventing me from actually uploading files at the moment. That may or may not be affecting the problem I am having in acidfree.

After uploading acidfree and visiting the settings page I go to create content->acidfree.

A message pops up saying that a new root node was created.

Then I enter the relevant acidfree data and submit. I get the following...(screen shot)

It seems that a new root album is created and the previous root is assigned to it. Also the child album is assigned to this new root album. So everytime I create one new album I get two, one of which becomes the new overall root album supplanting the prevous one.

I hope this helps.

gte451f’s picture

LAMP Stack
Apache 2
PHP 5.0.4
MySql 4.x

vhmauery’s picture

what does acifree/test tell you? And are you really using the CVS version (as in drupal HEAD) or are you using a 4-6 branch of CVS? Both are CVS, though they are incompatible. There should be a way to distinguish the two on this form, but I don't know if there is a way.

gte451f’s picture

StatusFileSize
new90.81 KB

Attached is a screenie showing the test that comes up from a fresh install of cvs drupal, filemanager and acid free.

I have drupal-cvs. I go to download->cvs->download it links to
http://drupal.org/files/projects/drupal-cvs.tar.gz

I wouldn't know where to get 4.6x cvs.

I am also having trouble with the filemanager module actually uploading files so could it be tied to that? I suppose not, duplicate albums is a node creation issue not a file issue.

inzite’s picture

I'm having the exact same issue.

I just installed the 4.7.0 beta fresh onto a test server. I did not try to update my old database, but rather started with the generic empty drupal database.

I then downloaded the cvs versions of the filemanager plugin and acidfree. I installed filemanager per its instructions, patched it with the patch included with the acidfree distribution, and then installed acidfree.

I then open up the page http://mysite.com/acidfree/test and receive the following output:

================= SNIP =================

Acidfree albums
Acidfree self-test checklist

1. Filemanager module enabled
2. Latest version of Filemanager module installed
3. filemanager-private.patch applied
4. Filemanager private path set and permissions OK
5. Filemanager public path set and permissions OK
6. Filemanager database table created
7. Acidfree class definition files found for album, photo, video
8. Drupal 'Temporary directory' path set and permissions OK
9. Acidfree database tables created
10. gd image toolkit installed and properly configured

No errors were detected. But this doesn't mean that Acidfree is guaranteed to work flawlessly. It is a complex system and still under development. Please be patient while all the wrinkles are found and ironed out.
PHP configuration

* Maximum file upload size is 10M (upload_max_filesize)
* Maximum POST size is 8M (post_max_size)
* Maximum execution time is 30 seconds (max_execution_time)
* Maximum memory usage is 32M (memory_limit)

If these limits are smaller than the files you plan on uploading, you should change the settings in your php.ini file

================= END SNIP =================

Upon attempting to create a first album, I receive the following notification at the top of the page:

================= SNIP =================

No Acidfree root album found, created new root -- node 16

================= END SNIP =================

I continue with creating the first album. I note that on the album creation page, the "Parent album" field is no longer available. This field was available in Drupal 4.6.0. Has it been removed from 4.7.0?

I create the album, and on the following screen I receive the following message:

================= SNIP =================

Found 2 Acidfree root albums, new root is node 18

================= END SNIP =================

Inspecting my admin/node page, I see the following nodes have been created:

================= SNIP =================

Acidfree Albums new acidfree album admin not published edit
TEST ALBUM acidfree album admin published edit
Acidfree Albums new acidfree album admin not published edit

================= END SNIP =================

If I inspect my drupal database, I find the following entries:

acidfree table
================= SNIP =================
aid class large small thumb weight visited votes
16 album -60 0 1
17 album -45 0 1
18 album -60 0 1
================= END SNIP =================

acidfree_hierarchy
================= SNIP =================
child parent
16 18
17 18
18 -1
================= END SNIP =================

I hope this helps to figure out what the issue is. I'm going to keep hacking away at it. Will come back with more details as soon as I have them.

inzite’s picture

Fix found.

The problem relates to line 1009 in the file acidfree.modules

Setting the variable $parent_output to any non-null value fixes the problem. If it is left null, the Parent album selection box is not displayed when creating a new acidfree node. Thus, when a new acidfree node is created, it has no parent, and ultimately a search for the root node (starting from the new node) fails. A new root node is created, even though another root node already exists. Later, another function recognizes the existence of two root nodes and demotes one of them.

You can set $parent_output to line 1009 to any non-null value to fix the problem. The following examples should all work.

$parent_output = 'yo';

$parent_output = 'what up homies';

$parent_output = '133t 5ki112';

vhmauery’s picture

Status: Active » Needs review
StatusFileSize
new796 bytes

I think that was left over from the forms port from drupal 4.6 to drupal 4.7. Try this patch.

vhmauery’s picture

Status: Needs review » Closed (fixed)

This patch was incorporated in the 4.7 release. Check it out -- you no longer have to use CVS. :)