![]() |
|
MySQL error in "albums" - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: MySQL error in "albums" (/thread-12544.html) |
MySQL error in "albums" - hunchback - 2016-06-26 Hello all, Here's an example of the error: [code]Fatal error: MySQLi Error: ( INSERT INTO [prefix]albums (folder, show, mtime, title, date, parentid) VALUES ('2015/04 - April/2015-04-05 P�ques Chasse aux Oeufs', '1', '1466473461', '2015-04-05 P�ques Chasse aux Oeufs', '2016-06-21 04:44:21', '645') ) failed. MySQLi returned the error Duplicate entry '2015/04 - April/2015-04-05 P' for key 'folder' in /home/manchevi/public_html/zp-core/functions-db-MySQLi.php on line 78 What we did try so far is to delete the whole cache folder so that the system can start fresh with the new folder tree but it doesn't seem to have fixed the problem. On a side note, might be related or not, there's a specific folder in the cache that doesn't want to delete via FTP, saying it's not empty... but it is empty. Any ideas? MySQL error in "albums" - acrylian - 2016-06-26 Deleting the Zenphoto would update (sync) it's albums and database relations automatically on the next visit if you modified the file system via ftp. You can also manually request that by performing a "database refresh". There is a button for this on the overview page on the backend. To the mysql error: Apparently you have duplicate entries that should be unique in the database. How that happened I cannot really tell. It might be a setup problem or it got corrupt somehow. Best first try the database refresh to see if that help to sync it again. If it doesn't you may need to use a backup or setup everything fresh. MySQL error in "albums" - hunchback - 2016-06-27 Hello, I know deleting /cache doesn't help with the structure but since at first there were duplicated entries in that folder because it kept the original cache and the new one too. I tried running the refresh db, it produced the same error (same type, with other duplicates, as usual). Do you suggest we completely reinstall the system? MySQL error in "albums" - acrylian - 2016-06-27 Ok, then I maybe misunderstood a bit. I fear from here this sounds like an issue with the database as there should not be duplicate entries as that cannot happen in the file system actually. If you haven't entered any data on the backend that could be lost, you can also empty the albums folder and re-upload all of your albums (you can of course just move the albums out of the albums folder to save uploading everything). A complete reinstall should not be necessary, if you should use a backup your database before the issue occured (if you haven't you should setup such backups, ZP has a tool for that onboard). MySQL error in "albums" - hunchback - 2016-06-27 Hm, i did a clean install and moved my albums back to their folder. Sadly, the same problem occurred. I believe the problem happens when you use the "random thumbnail" for album covers. I removed it and so far it's working fine. However the site is very slow. Since this is a brand new host for me, i have no idea if it's the host being slow or the ZenPhoto engine. MySQL error in "albums" - acrylian - 2016-06-27 You said you moved to that host so the database was a fresh one then? Then something might have gone wrong on running setup. An idea would be to setup a 2nd test site with a new database to see if it occurs there as well. If so something goes wrong with your host's db. You can also check within the albums table via tools like phpmyadmin if 'id" has the primary mark and "folder" really is set to "unique". If not you could try to add that via SQL afterwards. But it should have happened on installing. Yes, by default Zenphoto caches resized images on demand: Depending on the host's power, the size (dimensions) and number of images and albums this that can be slow. Other systems just feel faster because they create some default sizes on upload. We don't as themes have all freedom to use their own sizes. It is possible to pre-cache using the cacheManager. But a theme must be setup for it if it is using it's ownl sizes. |