Files gallery problems after update from 4.3 to 5.1 Posted by gimpsi 17 Sep 2010 16:59 UTC Hi, Files gallery: no longer able to create new galleries (database error) and use File Gallery module after upgrading from 4.3 to 5.1. I hope you can help me. Stefano
Posted by ripero 26 Sep 2010 03:17 UTC I have what may be a very similar problem: I just upgraded from 4.3 to 5.2, and I get the same mysql error every time I try to edit or create a file gallery: The following error message was returned: Unknown column 'show_lastDownload' in 'field list' The query was: insert into `tiki_file_galleries`(`name`, `description`, `created`, `user`, `lastModif`, `maxRows`, `public`, `hits`, `visible`, `show_id`, `show_icon`, `show_name`, `show_description`, `show_created`, `show_hits`, `show_lastDownload`, `max_desc`, `type`, `parentId`, `lockable`, `show_lockedby`, `archives`, `sort_mode`, `show_modified`, `show_creator`, `show_author`, `subgal_conf`, `show_last_user`, `show_comment`, `show_files`, `show_explorer`, `show_path`, `show_slideshow`, `default_view`, `quota`, `image_max_size_x`, `image_max_size_y`, `backlinkPerms`, `show_backlinks`) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) Values: 1. mytestfilegallery 2. 3. 1285469672 4. jme 5. 1285469672 6. 25 7. n 8. 0 9. y 10. o 11. y 12. f 13. n 14. y 15. y 16. n 17. 1024 18. default 19. 19 20. n 21. n 22. -1 23. 24. y 25. o 26. o 27. 28. o 29. o 30. y 31. y 32. y 33. 34. list 35. 0 36. 0 37. 0 38. n 39. n The built query was likely: insert into `tiki_file_galleries`(`name`, `description`, `created`, `user`, `lastModif`, `maxRows`, `public`, `hits`, `visible`, `show_id`, `show_icon`, `show_name`, `show_description`, `show_created`, `show_hits`, `show_lastDownload`, `max_desc`, `type`, `parentId`, `lockable`, `show_lockedby`, `archives`, `sort_mode`, `show_modified`, `show_creator`, `show_author`, `subgal_conf`, `show_last_user`, `show_comment`, `show_files`, `show_explorer`, `show_path`, `show_slideshow`, `default_view`, `quota`, `image_max_size_x`, `image_max_size_y`, `backlinkPerms`, `show_backlinks`) values ('mytestfilegallery','','1285469672','jme','1285469672','25','n','0','y','o','y','f','n','y','y','n','1024','default','19','n','n','-1',NULL,'y','o','o',NULL,'o','o','y','y','y',NULL,'list','0','0','0','n','n') Maybe we should file a bug(?)
Posted by Xavier de Pedro 27 Sep 2010 09:31 UTC Hi gimpsy and ripero, and welcome to Tiki community! 😊 gimpsy/Stefano: ensure that you have done the Upgrade properly as far as the utf-8 issue is concerned. Please follow the steps in the Upgrade, while setting again your db settings while: keeping the checkbox to "force utf-8" change db and tables to utf-8 if/when suggested to do so convert your content from latin1 (or whatever character set you had in your db tables until before the upgrade) to utf8. That's at the last step before locking your db and entering tiki. And ripero, if you have upgraded the db as explained in the Upgrade, can you compare your mysql table tiki_file_galleries in your db, with the same table in the a brand new tiki 5.2 that you install in your localhost? Search for that 'show_lastDownload' in 'field list', I would say.... And please, report back with any findings on that comparison...
Posted by zakmackracken 27 Sep 2010 15:15 UTC Hi, some feedback from me: I had the same problem as posted above. Thanks for the advice, xavi: I compared tables against a fresh install and indeed, show_lastDownload field was missing. Manually inserting this field in the broken database and setting it to datatype CHAR(1), Default NULL, and Encoding type utf-8 solved the problem (it seems at least): I can again create file galleries without error.
Posted by ripero 27 Sep 2010 16:26 UTC Hi Xavi, As you suggested, I compared the 'tiki_file_galleries' table in the database of a fresh 5.2 install with my upgraded (from 4.3) tiki 5.2 database. The 'show_lastDownload' field of the table is present in the freshly-installed database (between the 'show_hits' and the 'parentId' fields, to be precise), but my upgraded database doesn't have such a field in that table. By the way, I also checked that the problem persists whether I change from latin1 to utf8 in the upgrade process from 4.3 to 5.2 or not (using the installer conversion tool).
Posted by ripero 27 Sep 2010 16:28 UTC I also had a look to the 'db' code folder. The only file that seems to contain a 'show_lastDownload' string (according to a case-insensitive grep) is 'db/tiki.sql'. This field was added in January 2010. I think the installer should execute the 'installer/schema/20060116_showlastDownLoad_tiki.sql' script to correctly 'ALTER' the table during the upgrade. However, I don't know why it wouldn't do so. I think I will run the script on my own to get things working, but I fear other scripts may have been skipped in the upgrade process. Thank you for your time, and sorry for the multiple posts.