I'm having trouble when trying to upgrade from v4.7 to v5 of AcidFree. This could be user error.

Site status report:
Drupal 5.0
Database schema Up to date
File system Writable (public download method)
MySQL database 5.0.27
PHP 4.4.4
Unicode library PHP Mbstring Extension
Web server Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/4.4.4

Using AcidFree HEAD version (23 January 2007). /* $Id: acidfree.module,v 1.113 2007/01/22 15:15:01 vhmauery Exp $ */

When I run "update.php", select versions for acidfree module shows only updates 1, 2, 4. When update#4 runs it lists only "no queries". Could it be that somehow it's skipping update#3 where much of the work gets done? It looks to me like the acidfree update isn't throwing an error.

However I do get a watchdog error straight afterwards which I think (I'm pretty sure) relates to the "Random photo" block I have on the site. This error reads:

Invalid argument supplied for foreach() in myhome\public_html\sites\all\modules\acidfree\acidfree.module on line 770.

My DB schema has only got the acidfree and the acidfree_hierarchy tables after the update. I think there should be more (acidfree_albums & others?).

Any assistance would be great.

CommentFileSizeAuthor
#1 filemanager.info297 bytesalkcxy

Comments

alkcxy’s picture

StatusFileSize
new297 bytes

Filemanager module needs a filemanager.info file in its directory to work correctly.
Try to copy the acidfree.info file. You also need to modify some strings, then try to update again...

I have attached an info that *could* work. It works for me, I just upgrade my test site with acidfree and drupal-5.

vjordan’s picture

Title: v4.7 to v5 upgrade: Invalid argument supplied for foreach() » ACIDFREE v4.7 to v5 upgrade: database update problems

Thanks for the assistance so far. I'm making some progress but it's a bit more stop than start. I've tried the whole sequence from a restore of the v4.7 files and DB backup. I created the filemanager.info file and this helped update.php complete. But then I get the following watchdog errors:

Table DBName.acidfree_album doesn't exist query: SELECT * FROM acidfree_album WHERE aid=37 in DRUPALHOME\includes\database.mysql.inc on line 167.

I'm also getting an Access Denied error for www.example.com/album when logged in with UID=1

vhmauery’s picture

It sounds like you are not getting Acidfree upgraded properly. Because of dependencies, this is really a multi-step process. Something along the lines of:

1) disable all modules
2) upgrade drupal code
3) run upgrade script
4) upgrade module code
5) enable modules (other than Acidfree)
6) run upgrade script
7) make sure all Acidfree prerequisites are installed (for upgrade, this includes Filemanager (CVS version), Image, Taxonomy, Views, Video, Video Upload, Video Image -- video modules are only required for sites with videos)
8) run upgrade script again -- you should see 4 as the latest DB schema for Acidfree -- if you don't see 4 as the latest schema, you don't have all the prerequisites enabled.

vjordan’s picture

I was following the steps you outlined pretty much all along. I've done a complete reinstall from scratch (again) to try to see where my problems is. And I repeated it again this morning.

I get right up to step 7 fine (using a filemanager.info file). I have no video so I don't bother with the Video, Video Upload, Video Image modules.

On step 8 I get the Acidfree schema 4 listed. When I click "update" I get a "no queries executed" message. It seems like no activity is taking place, at all.

So next time, I go through all the steps again (restore v4.7 db, files etc.) and at step 8 I select update 3. Now when I press "update" there's a good bit of activity: the Acidfree_Album is created, the directories files/images and files/images/temp are created too, along with the files which are coming out of the filemanager containers. I get the following feedback on the browser:

    * Created Acidfree vocabulary
    * finished updating albums
    * The directory files/images has been created.
    * The directory files/images/temp has been created.
    * Finished updating images

It then throws an error where its looking for video API calls. (I overlooked copying this error).

I end up with:

The update process was aborted prematurely while running update #3 in acidfree.module. All other errors have been logged. You may need to check the watchdog database table manually.

BUT I can now see the albums and photos in my website. (It looks a bit whacky, but I can fix that by changing acidfree.css).

So, I still think there's a problem with the sequencing of the updates. Somehow when the (default) update 4 is being triggered it appears to skip over update 3 and the upgrade process therefore fails. Also, the error on videos might need to get trapped where there is a site with no video content. I might get a chance to start this all over again and copy and paste that error message in here. (The bright side of this troubleshooting is I can almost do the core v5 upgrade with my eyes closed!)

vjordan’s picture

A bit more troubleshooting information here...

The error thrown during the update for schema version 3 is as follows:
"An unrecoverable error has occured. You can find the error message below. It is advised to copy it to the clipboard for reference. Please continue to the update summary

Fatal error: Call to undefined function: _video_upload_check_settings() in C:\my_open_source\domains\galwaycityharriers.com\public_html\sites\all\modules\acidfree\acidfree.install on line 212

"

Now I've just been through the installation from scratch (again) this time using also the video module. (In case somebody goes looking, the drupal Video module download includes Video Image and Video Upload - they are not separate downloads / modules.)

Acidfree DB Schema 4 update continues to appear to do nothing. However, when I run against Acidfree DB schema v3 the update continues through to completion. I get the following feedback:-

    * Created Acidfree vocabulary
    * finished updating albums
    * The directory files/images has been created.
    * The directory files/images/temp has been created.
    * Finished updating images
    * The directory files/videos has been created.
    * The directory files/videos/temp has been created.
    * finished updating videos
    * Acidfree no longer requires Filemanager module. If no other modules require it, Filemanager can be uninstalled

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

    * main page
    * administration pages

The following queries were executed
acidfree module
Update #4

    * No queries

Update #3

    * CREATE TABLE {acidfree_album} (aid INT(11) NOT NULL auto_increment, tid int(11) NOT NULL default '0', thumb INT(11) NOT NULL default '0', share INT(1) NOT NULL default '0', order_by VARCHAR(32) NOT NULL default 'n.nid DESC', view varchar(32) NOT NULL default 'grid', PRIMARY KEY (aid)) type=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
    * DROP TABLE {acidfree}
    * DROP TABLE {acidfree_hierarchy}

I then have to go to update.php again for the Acidfree v4 update to clear the DB Schema warning.

I conclude an upgrade might be successful with the following process:
1. Upgrade core as instructed in the documentation.
2. Create a filemanager.info file for the HEAD revision of filemanager.
3. Enable the following non-core modules:
- Views
- Image
4. Run update.php and correct any errors found
5. Enable the following non-core modules:
- Video
- Video Image
- Video Upload
6. Run update.php and correct any errors found
7. Enable the following non-core module:
- Filemanager
8. (Might not need this, but just to be sure) Run update.php and correct any errors found
9. Enable the Acidfree module
10. Run update.php and... Select Version 3 for Acidfree
11. Run update.php and... Select Version 4 for Acidfree
12. Check everything is working as it should.

Cleanup (with care and only if these are not needed on your site):
1. Uninstall Video module and related modules
2. Uninstall filemanager

My guess is that the dependency on the Video modules and the sequencing of the DB schema updates might be fixable as Acidfree approaches a v5 release. If not, the documentation might need to be fleshed out a good bit to help the likes of me to get from start to finish.

vhmauery’s picture

Status: Active » Closed (fixed)

Okay. It sounds like there are no database problems now... I guess I missed some dependencies when writing the instructions. I think there is another current open bug to fix the UPGRADE file. I will take these notes into consideration when fixing that. Thanks for your work.

scor’s picture

wow! Great work Vincent! I'm sure it'll be useful as I will migrate to drupal 5 in the next couple of days...
Thanks again.
Steph.

hadishon’s picture

When I try the above steps, when I run update version 3, I get this error:

Fatal error: Call to undefined function _album_from_tid() in /httpdocs/modules/acidfree/acidfree.module on line 963

The file migration doesn't seem to happen. Nor I can I view any of the photo albums, pictures, or the acidfree main pages.

Any help would be appreciated.

hadishon’s picture

Status: Closed (fixed) » Active
mwheinz’s picture

_album_from_tid() is in class_album.inc; the problem sounds related to other reports about either class_album.inc not being included or not being installed.

Closing after 2 years of inactivity.

mwheinz’s picture

Status: Active » Closed (won't fix)