forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: maciekmaciek on May 18, 2019, 12:44:28 am

Title: Can't create a new album
Post by: maciekmaciek on May 18, 2019, 12:44:28 am
Hi, many thanks for the excellent gallery! I run it since 12 years and start to appreciate how nicely the photos start to look old :)

Now I've migrated my 1.5x gallery to a new server, and have upgraded it to 1.6.06. The process has been chaotic to some degree, but the gallery works: I can watch the photos, statistics, login as the admin, create a category etc. But I can't create a new album. A spinner shows up after typing the album's intended name and pressing the "OK" button, and nothing happens.

I can add the photos to the existing albums, albeit I've set up the permissions too generously.
Title: Re: Can't create a new album
Post by: ron4mac on May 18, 2019, 04:04:13 am
Link to gallery, please.
Title: Re: Can't create a new album
Post by: ron4mac on May 27, 2019, 12:29:46 pm
This issue was being caused by a field in the _albums table that was left over from CPG 1.3.  Removing the field was apparently missed in the CPG 1.4 upgrade mechanism. The field was last_addition (a date field) and its default value (0000-00-00 00:00:00) is not, by default, allowed in newer database engines. Removing the field from the table solved the problem.
Title: Re: Can't create a new album
Post by: gmc on June 10, 2019, 02:39:17 am
From what I have seen, the policy has been not to delete 'obsolete' fields from the database as part of an upgrade...
I identified a number of obsolete fields going back to 1.3 days when I coded 'Gallery Merge' for 1.5. When merging an older gallery, I ignored the fields, but many older galleries likely still contain them.

_USERS: 'user_favpics'
_CATEGORIES: 'subcat_count', 'alb_count', 'pic_count', 'stat_uptodate'
_ALBUMS: 'pic_count', 'last_addition', 'stat_uptodate'
_PICTURES: 'owner_name'

I think 'last_addition' is the only date field - and affected if enforcing new standards at database level.  Plugins may have also added date fields to various tables over time that may or may not still be used.

Not sure the right answer - but the gremlin is out there...
Title: Re: Can't create a new album
Post by: idosha on July 03, 2019, 03:04:36 am
Thank you for posting this fix, it also solved my issue. I would like to make it aware that this issue can also happen in version 1.5.46 as I discovered after changing to a server that uses a newer database engine (MySQL 5.7)