Gallery upgrade to 1.5.2 problem

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 199
Joined: Sun Sep 05, 2010 6:11 am

Gallery upgrade to 1.5.2 problem

Post 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
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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.
zzmarker
Forum Members
Forum Members
Posts: 20
Joined: Fri Oct 03, 2008 7:37 am

Re: Gallery upgrade to 1.5.2 problem

Post by zzmarker »

Hi,

Same problem with the Gallery update. I have also CMS 1.10.3
plus Gallery disappeared from Content menu.
User avatar
chrisbt
Dev Team Member
Dev Team Member
Posts: 199
Joined: Sun Sep 05, 2010 6:11 am

Re: Gallery upgrade to 1.5.2 problem

Post 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.
zzmarker
Forum Members
Forum Members
Posts: 20
Joined: Fri Oct 03, 2008 7:37 am

Re: Gallery upgrade to 1.5.2 problem

Post 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.
thile
Forum Members
Forum Members
Posts: 25
Joined: Mon Aug 25, 2008 3:57 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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?
thile
Forum Members
Forum Members
Posts: 25
Joined: Mon Aug 25, 2008 3:57 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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?
thile
Forum Members
Forum Members
Posts: 25
Joined: Mon Aug 25, 2008 3:57 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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.
echobrin
Forum Members
Forum Members
Posts: 54
Joined: Sat May 29, 2010 6:03 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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
LadyHLG
Forum Members
Forum Members
Posts: 38
Joined: Wed Apr 21, 2010 1:47 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: Gallery upgrade to 1.5.2 problem

Post 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 :P

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 ;D
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Gallery upgrade to 1.5.2 problem

Post 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.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: Gallery upgrade to 1.5.2 problem

Post 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
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Gallery upgrade to 1.5.2 problem

Post 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.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm

Re: Gallery upgrade to 1.5.2 problem

Post 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?
Post Reply

Return to “Modules/Add-Ons”