WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: NextGEN Gallery] Can't automatically update gallery database for the new version (40 posts)

  1. Alex Rabe
    Member
    Posted 5 years ago #

    OK, but my feeling that the date/time import causes this issue is correct. Comment out the function mentioned in a) should work. I will release a fix in two hours...

  2. go_big
    Member
    Posted 5 years ago #

    This is what I got after trying the new admin.php ...

    Start upgrade routine
    memory_limit :
    Current memory usage : N/A

    Update file structure...finished
    Import date and time information...
    and again back to nothingness.
    Someone mentioned renaming your gallery folder in content but I dont have one it is all unde uploads/ then the year and the folder
    wp-content/uploads/2008/"Picture folder" not sure what to rename. uploads?
    Thanks

  3. sruglass
    Member
    Posted 5 years ago #

    If wp-content/upload is ur default gallery folder then just rename the upload folder, then create an empty folder name, upload and when you are through you simply delete the empty folder and rename your original folder back to upload.

    My default gallery folder path for nextgen is wp-content/gallery and it worked fine for that.

    It that doesn't work, then I suggest that you wait until Alex comes out with a proper fix.

  4. sruglass
    Member
    Posted 5 years ago #

    Remember this only applies if you have a lot of galleries

  5. go_big
    Member
    Posted 5 years ago #

    Thanks sruglass that worked perfectly!!
    I have way too many photo's and albums to mess it up. Just wanted to make sure. Thanks Again!

  6. Alex Rabe
    Member
    Posted 5 years ago #

    @all
    I uploaded a new bugfix release (v1.0.1) it should at least passed the database structure, but could still failed during the import date/time procedure. Anyway, if you reload then the page you can still work with the gallery...

  7. mkastner
    Member
    Posted 5 years ago #

    I'm having a similar problem, but it looks like this fix won't work for me. When updating to the new wordpress and nextgen I got the notice to update the nextgen database. The process began, but timed out when it got to the date and time stage. The date now reads incorrectly and I can't access images that are handled through nextgen. THey are still on the server, but the url path leads to a 404 error.

    As for what I have done to try to fix this, I have tried everything suggested in this thread. Unfortunately, when I do a reinstall I am not prompted to update my database. I have about 40 galleries in place, so I am loath to delete the database unless I have to. I backed my databases up before upgrading and was trying to roll back to the previous version of the nextgen databases, but my backed up sql file is too big (4MB) and GoDaddy (I know they suck) seems to not like any compressed file I have sent.

    Is there any manual workaround to get things back in order?

  8. mkastner
    Member
    Posted 5 years ago #

    Any thoughts?

  9. alexo05
    Member
    Posted 4 years ago #

    Just FYi, this issue is also happening on WPMu v. 2.8.4. I tried the new upgrade file and tried renaming the folder where the galleries get stored, memory limit up to 64MB but still the upgrade script doesn't go through. :(

    Using NextGen v. 1.3.5

  10. wamitchell
    Member
    Posted 4 years ago #

    One possible issue is that the query in ngg_import_date_time is dying. We have a large gallery, and during the upgrade that particular query would return over 8000 rows. A quick patch that seems to work is selecting and processing the images 100 at a time:

    function ngg_import_date_time() {
    	global $wpdb;
    
    	$imagelist_count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures");
    
    	for ($offset=0; $offset < $imagelist_count; $offset += 100) {
    		$imagelist = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid ORDER BY tt.pid ASC LIMIT 100 OFFSET $offset");
    		if ( is_array($imagelist) ) {
    			foreach ($imagelist as $image) {
    				$picture = new nggImage($image, $image);
    				$meta = new nggMeta($picture->imagePath);
    				$date = $meta->get_date_time();
    				$wpdb->query("UPDATE $wpdb->nggpictures SET imagedate = '$date' WHERE pid = '$picture->pid'");
    			}
    		}
    	}
    
    }

Topic Closed

This topic has been closed to new replies.

About this Topic