upgrading to 1.2.6 (4335) no new gallery possible

Hi to all,

i've got a big problem after upgrading to 1.2.6
I'm not able to create new galleries.
The problem is that every insertion in the database is getting the id 0 which already extists.
I'didnt found an autoincrement which i could manipulate.
Does anyone know how the id's are set for the insert?

thanks

Comments

  • acrylian Administrator, Developer
    Note that the term "gallery" refers to the zenphoto installation as such. You mean actually "albums".
    Did setup report anything, are there any errors in your error log?
  • I'm sorry you're right. I thought of albums.
    The setup did'nt report anything.
    At the moment i'm waiting for the php, sql errorlog from my provider.
    In the Adminsection is only this one:
    Zenphoto Error
    MySQL-Abfrage ( INSERT INTO `zp_albums` (`folder`, `title`) VALUES ('test3', 'test3'); ) fehlgeschlagen. Fehler: Doppelter Eintrag '0' für Schlüssel 1

    Which means double entree 0 for key 1
  • acrylian Administrator, Developer
    Thanks, I am German myself...:-) From what version did you upgrade?
  • I upgraded from ver 1.2.2
  • That field should be configured as "auto increment". Perhaps that has been changed in your database. Anyway, if it is "auto increment" and not incrementing, then there is a problem with your MySQL. The SQL from Zenphoto has not touched the field.
  • Thank you that was the hint i needed.
    I searched in the setup.php for the correct database setup and the autoincrement statement for every id.
    That i was wondering about, cause it wasn't set in my database and in the backup from my host,too.
    I put the autoincrement to every id on the older version (1.2.2 after recovery the backup) and made an upgrade to 1.2.6.
    Now every thing is fine.
    Thanks a lot for that hint.
  • Well, the autoincrement is there from Zenphoto 1.0.8.2 (Which is the oldest version I have seen or used.) So I really do not know how it could have got lost from your database.
  • I still know now.
    I had the problem that i lost the description of the pictures after copiing the albums.
    So i ordered an database backup from my hoster. And at all i upgraded zenphoto in hope of a bugfix for the general copiing problem.
    After creating and filling the database with the update i lost all my auto_increment attributes.
    The provider didn't saved them in the backup.

    So it was no zenphoto problem, but i needed to know were i can start to find the problem.
    Is there a zenphoto entitiy relationsship diagramm for download?
    Cause i was searching in the main files of the core to know how the database interaction with the system works.
  • The database setup is all done in setup.php.
Sign In or Register to comment.