Page 1 of 2
Gallery upgrade to 1.5.2 problem
Posted: Sun Mar 11, 2012 1:55 pm
by chrisbt
While upgrading Gallery from 1.4.4 to 1.5.2 I seem to have wiped out all data from the uploaded images. The images are all still there but the titles, comments, album covers, order, Gallery titles are all gone.
This happened while upgrading a site to 1.10.3.
I have just checked the tables and 'cms_module_gallery' appears to contain all/most of this information. In fact there seems to be a duplicate set of rows that do not contain the additional text and order details.
Has anyone else had this issue or any suggestions on how to fix it. There are 12 galleries with about 20 images in each, so quite a lot to update manually.
Thanks - Chris
Re: Gallery upgrade to 1.5.2 problem
Posted: Sun Mar 11, 2012 11:32 pm
by nervino
Same problem here.
Cmsms 1.10.3
after upgrade from Gallery 1.5.1 to 1.5.2 all comments and title are gone.
Re: Gallery upgrade to 1.5.2 problem
Posted: Mon Mar 12, 2012 7:58 am
by zzmarker
Hi,
Same problem with the Gallery update. I have also CMS 1.10.3
plus Gallery disappeared from Content menu.
Re: Gallery upgrade to 1.5.2 problem
Posted: Mon Mar 12, 2012 8:12 am
by chrisbt
If Gallery disappeared from the menu try refreshing the Site Admin cache under Advanced setup. I believe it's a known bug that will probably be fixed with the next release.
Re: Gallery upgrade to 1.5.2 problem
Posted: Mon Mar 12, 2012 8:16 am
by zzmarker
Hi,
Gallery is now visible in the Content menu, I installed Gallery 1.5.2 again.
But all titles and comments are missing.
Re: Gallery upgrade to 1.5.2 problem
Posted: Sun Mar 18, 2012 4:47 pm
by thile
I just got the same problem.
I also just upgraded a site to 1.10.3, and this included upgrading gallery to 1.5.2
Now my title and descriptions are missing. The weird thing I just did an update on a test site, and here I did not get any problems.
Anyway here is a screenshot of my gallery setting from admin interface.
PLEASE DON'T POST SUCH LARGE IMAGES..!
Somehow the old information have a path like this
"2007///opvisning"
Does this make sense to anyone?
Should I start to edit the entries in the database manually?
Re: Gallery upgrade to 1.5.2 problem
Posted: Sun Mar 18, 2012 5:10 pm
by thile
Some entries from my database before upgrade:
(22, 'Holdbillede_1000/', '2011/foraarsopvisning', '2011-04-09 19:36:38', 18, 1,
0, 8, 'Holdbillede af hold 1000', ''),
(23, 'Holdbillede_1100/', '2011/foraarsopvisning', '2011-04-09 19:36:55', 19, 1,
0, 8, 'Holdbillede af hold 1100', ''),
(24, 'Holdbillede_1400/', '2011/foraarsopvisning', '2011-04-09 19:37:16', 20, 1,
0, 8, 'Holdbillede af hold 1400', ''),
(25, 'Holdbillede_1500/', '2011/foraarsopvisning', '2011-04-09 19:37:34', 21, 1,
0, 8, 'Holdbillede af hold 1500', ''),
(26, 'Holdbillede_1600/', '2011/foraarsopvisning', '2011-04-09 19:37:55', 22, 1,
0, 8, 'Holdbillede af hold 1600', ''),
(27, 'Holdbillede_1800/', '2011/foraarsopvisning', '2011-04-09 19:38:13', 23, 1,
0, 8, 'Holdbillede af hold 1800', ''),
Here is same export taken after upgrade:
(22, 'Holdbillede_1000/', '2011/foraarsopvisning///', '2011-04-09 19:36:38', 18,
1, 0, 8, 'Holdbillede af hold 1000', ''),
(23, 'Holdbillede_1100/', '2011/foraarsopvisning///', '2011-04-09 19:36:55', 19,
1, 0, 8, 'Holdbillede af hold 1100', ''),
(24, 'Holdbillede_1400/', '2011/foraarsopvisning///', '2011-04-09 19:37:16', 20,
1, 0, 8, 'Holdbillede af hold 1400', ''),
(25, 'Holdbillede_1500/', '2011/foraarsopvisning///', '2011-04-09 19:37:34', 21,
1, 0, 8, 'Holdbillede af hold 1500', ''),
(26, 'Holdbillede_1600/', '2011/foraarsopvisning///', '2011-04-09 19:37:55', 22,
1, 0, 8, 'Holdbillede af hold 1600', ''),
(27, 'Holdbillede_1800/', '2011/foraarsopvisning///', '2011-04-09 19:38:13', 23,
1, 0, 8, 'Holdbillede af hold 1800', '');
Anyone know what happened and why?
Re: Gallery upgrade to 1.5.2 problem
Posted: Tue Mar 20, 2012 4:40 pm
by thile
Today I had some time to fix the content in my database.
This solution can be applied when the upgrade has 'corrupted' the data.
Code: Select all
-- Create copy of table to have backup of data
CREATE TABLE `cmsms_module_gallery_bak` ( `fileid` int( 11 ) NOT NULL AUTO_INCREMENT ,
`filename` varchar( 255 ) DEFAULT NULL ,
`filepath` varchar( 255 ) DEFAULT NULL ,
`filedate` datetime DEFAULT NULL ,
`fileorder` int( 11 ) DEFAULT NULL ,
`active` int( 11 ) DEFAULT NULL ,
`defaultfile` int( 11 ) DEFAULT NULL ,
`galleryid` int( 11 ) NOT NULL ,
`title` varchar( 255 ) DEFAULT NULL ,
`comment` text,
PRIMARY KEY ( `fileid` , `galleryid` ) ) ENGINE = MyISAM DEFAULT CHARSET = latin1;
INSERT INTO `cmsms_module_gallery_bak` SELECT * FROM `cmsms_module_gallery`;
-- You can also use tool in myphpadmin to backup.
-- Delete duplicate data that has no title and no comment.
delete from cmsms_module_gallery where fileid > 1 and title = '' and comment = '';
-- Update remaining records that have title or comment, but wrong paths
-- Will replace /// with /
update cmsms_module_gallery set filename = replace(filename, '///', '/'), filepath = replace(filepath, '///', '/');
Of course use at own risk.
It worked for me, my comments and picture titles are working again.
Re: Gallery upgrade to 1.5.2 problem
Posted: Sun Apr 22, 2012 5:27 pm
by echobrin
Has anyone made any progress on this issue? I have several sites that are still using Gallery 1.4.4 because I had this same issue during upgrade. The paths seem to be getting corrupted, titles are missing, and extra records are added to the database. I have nearly 600 records in the database so I want to avoid trying to fix it manually, if at all possible. I tried the upgrade on a test site first and it worked, so I was surprised when I ran into problems on the live site.
If I try to access my galleries in the backend, they don't show up and I get the following error:
Warning: opendir(../uploads/images/Gallery/Gallery/) [function.opendir]: failed to open dir: No such file or directory in /modules/Gallery/lib/class.Gallery_utils.php on line 23
Re: Gallery upgrade to 1.5.2 problem
Posted: Thu Apr 26, 2012 10:52 pm
by LadyHLG
I am seeing similar problems in trying to upgrade the Gallery from 1.4.4 to 1.5.3.
Had to roll back to 1.4.4.
Has anyone figured out what is happening?
LadyHLG
Re: Gallery upgrade to 1.5.2 problem
Posted: Tue May 22, 2012 10:49 pm
by paulbaker
I had the same problem as others described, problem started when I upgraded from 1.9.4.something to 1.10.3 and upgraded gallery to 1.5.3.
I used thile's general repair technique (thanks for posting thile), deleting the rows in cms_module_gallery which appear to be dupes - at the end of the table. I also sorted the /// issue, replacing /// with /.
All appears to be OK now. Phew
applejack raised a bug report but then closed it. I have posted a note on the report:
http://dev.cmsmadesimple.org/bug/view/7951
*Waves* Hello fellow geekmooter chrisbt

Re: Gallery upgrade to 1.5.2 problem
Posted: Tue May 22, 2012 11:59 pm
by applejack
I didn't close it Jos the dev did. It is always a good idea to upgrade one version at a time but it is still considered as a issue then raise it again and point out this thread.
Re: Gallery upgrade to 1.5.2 problem
Posted: Wed May 23, 2012 12:28 am
by paulbaker
applejack wrote:I didn't close it Jos the dev did.
In which case I take that back.
applejack wrote:It is always a good idea to upgrade one version at a time
I did what I presume others do and upgrade by clicking the links in the Module Manager. This gives no option to upgrade one version at a time.
applejack wrote:but it is still considered as a issue then raise it again and point out this thread.
Done! Thanks applejack.
New bug report:
http://dev.cmsmadesimple.org/bug/view/7980
Re: Gallery upgrade to 1.5.2 problem
Posted: Wed May 23, 2012 1:29 am
by applejack
I did what I presume others do and upgrade by clicking the links in the Module Manager. This gives no option to upgrade one version at a time.
There is if you set the preferences of module manager to show all version not just the latest. You can also check on this site and see the different file versions in the modules section.
Re: Gallery upgrade to 1.5.2 problem
Posted: Wed May 23, 2012 8:25 am
by Jos
I'm sorry that I closed the bugreport to soon. I did fix some issues in the upgrade script, but could not find anything that could cause the multiple slashes. I don't know how to reproduce this either...
Which version of MySQL do you use?