Just installed filemanager module and acidfree. I've ran the acidfree test. Everythings seems fine. When I go to create content/acidfree media I get the following error message:

Unknown column 'share' in 'field list' query: SELECT class,large,small,thumb,weight,visited,votes,share FROM acidfree WHERE aid = 63 in /homepages/18/d126859316/htdocs/newSiteDevelopment/Drupal/includes/database.mysql.inc on line 120

The 'share' field wasn't created in the acidfree table.

Comments

havran’s picture

Try call yourweb/update.php, then click run the database upgrade script and click Update.

vhmauery’s picture

Status: Active » Fixed

remember that the admin/modules page warns you to run the update.php script after every module upgrade. This is one of the times where you need to heed its advice. This is really the first database change I have made since creating Acidfree. I don't doubt you will be the first or last to trip over this.

Run the update.php Drupal database upgrade script while logged in as the admin user. It should tell you that it added the share column to the acidfree table.

patchak’s picture

Hey,

I had the same mistake and It's not an update issue as this is the first time I try to install acidfree on that test site...

Any ideas?
Thanks

dman’s picture

I got the same - on a brand new install.

Whilst the suggested process of using the 'install.php' DID work, I think something must be missing from acidfree.install.
Surely the acidfree_install() function (which only gets run on a new distro) should come complete with the required table definition without then needing to be immediately upgraded?

I don't fully grok what happens with the magic upgrade scripts, but I suspect they should NOT be needed on a fresh site.

The patch to acidfree.install is of course

...
						votes int(11) NOT NULL default '0',
						share tinyint(1) NOT NULL DEFAULT '0',
						PRIMARY KEY  (aid),
...
Axel_V’s picture

I had run the update after first installing acidfree a few days ago and the problem occured anyway. However, I've found out the folloiwng: run the update script and you will get the "select versions" view. Go to the "acidfree module" dropdown where it says "no updates available" and select "2". Now click update. It should install the share column. At least it did on my Drupal installation.

COTAMichelle’s picture

That worked Axel. Thanks!

vhmauery’s picture

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

Status: Closed (fixed) » Active

The .install file still needs to be fixed for fresh installs in the latest 4.7.0 release.

vhmauery’s picture

Status: Active » Fixed

I didn't realize that new installs don't do the updates too.... My bad.

I just committed a patch that fixes this. Sorry for the delay. Look for acidfree.install version 1.1.2.9 (should be repackaged in a few hours.)

Steel Rat’s picture

Would that be the CVS update? I thought that was for HEAD only.

Since running the update.php script isn't working, just sits and does nothing most of the time, is there a way to completely uninstall Acidfree so I can start over again, without having to re-install Drupal?

Steel Rat’s picture

After finally getting the update.php script to run, the "share" field error is gone, but the other problem remains. There is no root album shown when I navigate to ?q=acidfree. In fact there are no albums shown, even after I created a couple. I have to go to the albums directly via Recent posts.

Shouldn't there be a listing of the sub-albums directly below the root album? Shouldn't there be some sort of graphic for the albums? Or is that theme-dependent?

I haven't attempted to get a new version as yet.

vhmauery’s picture

Steel Rat,

Because you installed the module that had a faulty installer, your Drupal system is likely confused. This is a recoverable problem, though. Here is what I would do to convince Drupal that you never installed the module:

  1. Go to the admin/modules page and disable Acidfree
  2. Issue the following sql commands:
    mysql> DELETE FROM system WHERE name='acidfree';
    mysql> DELETE FROM variable WHERE name LIKE '%acidfree%';
    mysql> DROP TABLE acidfree;
    mysql> DROP TABLE acidfree_hierarchy;
    mysql> TRUNCATE cache;
    
  3. Then you should go in to the content admin page and delete all the nodes that are type acidfree
  4. If there were files associated with any of the acidfree stuff, you could delete those too
  5. Go to the admin/modules page and re-enable Acidfree.
Steel Rat’s picture

I removed Acidfree using the method above, and deleted the module after disabling it.

Then I downloaded the CVS version as recommended, and tried enabling the module.

Got the following error:

user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(aid), KEY class (class) query: CREATE TABLE acidfree ( aid int(11) NOT NULL auto_increment, class varchar(16) NOT NULL default '', large varchar(255) NOT NULL default '', small varchar(255) NOT NULL default '', thumb varchar(255) NOT NULL default '', weight tinyint(5) NOT NULL default '0', visited int(11) NOT NULL default '0', votes int(11) NOT NULL default '0', share TINYINT(1) NOT NULL DEFAULT '0' PRIMARY KEY (aid), KEY class (class) ) T in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.

Steel Rat’s picture

Wiped my Drupal database and started over, got this error.

user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(aid), KEY class (class) query: CREATE TABLE acidfree ( aid int(11) NOT NULL auto_increment, class varchar(16) NOT NULL default '', large varchar(255) NOT NULL default '', small varchar(255) NOT NULL default '', thumb varchar(255) NOT NULL default '', weight tinyint(5) NOT NULL default '0', visited int(11) NOT NULL default '0', votes int(11) NOT NULL default '0', share TINYINT(1) NOT NULL DEFAULT '0' PRIMARY KEY (aid), KEY class (class) ) T in /home/steelrat/public_html/drupal/includes/database.mysql.inc on line 120.

PLEASE tell me what needs to be done from a clean 4.7.3 intall!!!!

Steel Rat’s picture

That error occurred at the same point as that of #13.

vhmauery’s picture

Steel Rat,

I am so sorry this is not going well for either of us.

I realized from the error message in your last comments that there was a missing comma in the install sql statement. I am not sure how that escaped me -- the postgres version got it's comma...

Anyway, I committed the fix so it should work for you now.

Steel Rat’s picture

Do I need to wipe everything again?

Steel Rat’s picture

FYI, I re-downloaded the CVS version, and the most recent file date is 09/19...

Steel Rat’s picture

And when I overwrite the previous Acidfree and try to enable the module I get this:

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

I don't think I have the hair left to give this too many more tries.

Steel Rat’s picture

I wiped it all again and re-downloaded the 4.7.x version. Same error as #13 and 14.

The latest file was 09/25 10:02 am, so I'm guessing the file hasn't been updated yet. Please notify me when it is.

vhmauery’s picture

Steel Rat,

All the code I have checked in is in the latest tarball. The 4.7 tarball should work for you using the instructions I supplied in comment #12. May the force be with you.

Steel Rat’s picture

Yay!! I can go on with my life!! It worked!!

I REALLY don't want to go through that again, lol.

Thanks for the help!!

rettahchm’s picture

The following mysql command can also be used to sort out the problem.

1. Log on to the database using mysql. Connect to the appropriate database.
2. Enter the following command.

alter table acidfree add column share tinyint(1) not null default '0';

That will alter the table adding the missing column.

Steel Rat’s picture

That didn't really fix all the issues though, just one aspect of the overall problem.

I am happy to say it's all working now, apart from some formatting issues publishing acidfree photos to the front page.

Anonymous’s picture

Status: Fixed » Closed (fixed)