Support

Support is part of Event Gallery Extended.

Please get a subscription if you need support. Feel free to use the ticket system or the contact form for reporting defects or pre-sale questions. Make sure you're logged in in order to be able to create a new ticket.

For general information you can also jump to the manual.

Subscribe now!

#1572 upgrade gallery on new version not work

Posted in ‘Event Gallery - General’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by sbluege on Thursday, 11 June 2015 07:51 UTC

matjazr
 so this morning i was on my joomla option to upgrade gallery to latest version 3.3.2 - lite....off course i run it....and get error:

Duplicate entry '0' for key 'PRIMARY' SQL=INSERT INTO `kitjf_eventgallery_foldertype` (`id`, `name`, `folderhandlerclassname`, `displayname`, `default`, `ordering`, `published`, `modified`, `created`) VALUES (0, 'local', 'EventgalleryLibraryFolderLocal', 'Local Images', 1, 1, 1, '0000-00-00 00:00:00', NULL), (1, 'picasa', 'EventgalleryLibraryFolderPicasa', 'Picasa Images', 0, 2, 1, '0000-00-00 00:00:00', NULL);

and error is in my language but say: like cannot instal com_eventgallery_3_3_2.zip


where is problem?

sbluege
To fix this, you need to remove the values from this table but I assume you'll encounter other error as well. This can only happen if you had a version of Event Gallery 3.3 installed before. The table is new and can't contain any values. Can you explain what exactly you did?

matjazr
so i have previous version of Event Gallery installed....joomla update give me opition to upgrade Event Gallery to 3.3.2 and i acept it....then i got this message....

sbluege
Hmm.. strange. This can only happen if you execute the update sql twice.

Here is the 3.3.2 update sql:

A LTER TABLE  `#__eventgallery_watermark` ADD  `image_thumbthresholdsize` int(4) NOT NULL DEFAULT '0' AFTER `image_opacity`;
A LTER TABLE  `#__eventgallery_watermark` ADD  `default` int(1) NOT NULL DEFAULT 0 AFTER `published`;
A LTER TABLE  `#__eventgallery_file` ADD  `url` text NOT NULL AFTER `title`;
A LTER TABLE  `#__eventgallery_staticaddress` ADD  `state` varchar(255) NOT NULL AFTER `city`;
A LTER TABLE  `#__eventgallery_useraddress` ADD  `state` varchar(255) NOT NULL AFTER `city`;
A LTER TABLE  `#__eventgallery_folder` ADD  `foldertypeid` int(11) DEFAULT '0' AFTER `id`;
A LTER TABLE  `#__eventgallery_folder` ADD `metadata` TEXT NOT NULL AFTER `attribs`;

A LTER TABLE `#__eventgallery_imagetype` ADD `weight` DECIMAL( 4, 2 ) DEFAULT  '0' AFTER `size`;
A LTER TABLE `#__eventgallery_imagetype` ADD `depth` DECIMAL( 4, 2 ) DEFAULT  '0' AFTER `size`;
A LTER TABLE `#__eventgallery_imagetype` ADD `height` DECIMAL( 4, 2 ) DEFAULT  '0' AFTER `size`;
A LTER TABLE `#__eventgallery_imagetype` ADD `width` DECIMAL( 4, 2 ) DEFAULT  '0' AFTER `size`;

C REATE TABLE IF NOT EXISTS `#__eventgallery_foldertype` (
  `id` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `folderhandlerclassname` varchar(200) DEFAULT NULL,
  `displayname` varchar(125) DEFAULT NULL,
  `default` int(1) NOT NULL DEFAULT 0,
  `ordering` int NULL DEFAULT NULL,
  `published` int(1) NULL DEFAULT NULL,
  `modified` timestamp NULL DEFAULT NULL,
  `created` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
);


I NSERT INTO `#__eventgallery_foldertype`  (`id`, `name`, `folderhandlerclassname`, `displayname`, `default`, `ordering`, `published`, `modified`, `created`) VALUES
(0, 'local', 'EventgalleryLibraryFolderLocal', 'Local Images', 1, 1, 1, '0000-00-00 00:00:00', NULL),
(1, 'picasa', 'EventgalleryLibraryFolderPicasa', 'Picasa Images', 0, 2, 1, '0000-00-00 00:00:00', NULL);


u pdate `#__eventgallery_folder` set foldertypeid=1 where folder like '%@%';


Since the table adjustments did work we need to care about the data migration now. Please try to execute this script:

D ELETE FROM `#__eventgallery_foldertype`;

I NSERT INTO `#__eventgallery_foldertype`  (`id`, `name`, `folderhandlerclassname`, `displayname`, `default`, `ordering`, `published`, `modified`, `created`) VALUES
(0, 'local', 'EventgalleryLibraryFolderLocal', 'Local Images', 1, 1, 1, '0000-00-00 00:00:00', NULL),
(1, 'picasa', 'EventgalleryLibraryFolderPicasa', 'Picasa Images', 0, 2, 1, '0000-00-00 00:00:00', NULL);


U PDATE `#__eventgallery_folder` set foldertypeid=1 where folder like '%@%';

u pdate #__schemas
set version_id='3.3.0'
where extension_id in (
  select extension_id
  from #__extensions
  where element = 'com_eventgallery'
);


Make sure you replace '#__' with your database prefix. In addition please remove the spaces in 'D ELETE', 'U PDATE' and 'I NSERT'. Once this is done simple download and install the package again.

matjazr
incredible....this last sql string was solution....
so this mean that in future is not recommend to upgrade gallery?

sbluege
I always recommend an upgrade. But some installations behave unexpected like yours. But as you can see this can be usually fixed.