Page 1 of 1

Can't reinstall Phoca Maps

Posted: 14 Feb 2016, 13:50
by Rokell
Hi,
I had a virus problem with my Joomla installation and had to reinstall Joomla and components using the currrent database. It worked with all components appart from Phoca Maps. I receive the following error:

Duplicate entry '1' for key 'PRIMARY' SQL=INSERT INTO `joskas_phocamaps_icon` (`id`, `title`, `alias`, `url`, `urls`, `object`, `objects`, `objectshape`, `published`, `checked_out`, `checked_out_time`, `ordering`, `access`, `hits`, `params`, `language`) VALUES (1, 'Tree', 'tree', 'http://maps.google.com/mapfiles/ms/icons/tree.png', 'http://maps.google.com/mapfiles/ms/icon ... shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 1, 1, 0, '', ''), (2, 'Pushpin', 'pushpin', 'http://maps.google.com/mapfiles/ms/icon ... ushpin.png', '', '', '', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 2, 1, 0, '', ''), (3, 'Blue Dot', 'blue-dot', 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png', '', '', '', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 3, 1, 0, '', ''), (4, 'Flag', 'flag', 'http://maps.google.com/mapfiles/ms/icons/flag.png', 'http://maps.google.com/mapfiles/ms/icon ... shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 3, 1, 0, '', ''), (5, 'Info', 'info', 'http://maps.google.com/mapfiles/ms/icons/info.png', 'http://maps.google.com/mapfiles/ms/icon ... shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 5, 1, 0, '', ''), (6, 'Snack Bar', 'snack-bar', 'http://maps.google.com/mapfiles/ms/icons/snack_bar.png', 'http://maps.google.com/mapfiles/ms/icon ... shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,32,30', 1, 0, '0000-00-00 00:00:00', 6, 1, 0, '', '');

Looks like Phoca Maps detects the old installation in the database. If I delete the entries in the database I will lose all my maps data. Is there a way to fix this without starting from scratch?

Thanks
Roger

Re: Can't reinstall Phoca Maps

Posted: 14 Feb 2016, 20:03
by Jan
Hi, this seems like the table was included in your database and it included the default data. Do you use own icons, if not, you can delete the icons table only, it will be newly created and default data will be newly added.

If you have own icons in table: #__phocamaps_icon then the only way is to edit the installation script of the Phoca Maps and remove the adding of default data:

Open the file in installation ZIP (edit it directly or copy it from ZIP, edit it and copy it back):
install\sql\mysql\install.utf8.sql

and remove this part:

Code: Select all

INSERT INTO `#__phocamaps_icon` (`id`, `title`, `alias`, `url`, `urls`, `object`, `objects`, `objectshape`, `published`, `checked_out`, `checked_out_time`, `ordering`, `access`, `hits`, `params`, `language`) VALUES
(1, 'Tree', 'tree', 'http://maps.google.com/mapfiles/ms/icons/tree.png', 'http://maps.google.com/mapfiles/ms/icons/tree.shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 1, 1, 0, '', ''),
(2, 'Pushpin', 'pushpin', 'http://maps.google.com/mapfiles/ms/icons/red-pushpin.png', '', '', '', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 2, 1, 0, '', ''),
(3, 'Blue Dot', 'blue-dot', 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png', '', '', '', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 3, 1, 0, '', ''),
(4, 'Flag', 'flag', 'http://maps.google.com/mapfiles/ms/icons/flag.png', 'http://maps.google.com/mapfiles/ms/icons/flag.shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 3, 1, 0, '', ''),
(5, 'Info', 'info', 'http://maps.google.com/mapfiles/ms/icons/info.png', 'http://maps.google.com/mapfiles/ms/icons/info.shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,25,30', 1, 0, '0000-00-00 00:00:00', 5, 1, 0, '', ''),
(6, 'Snack Bar', 'snack-bar', 'http://maps.google.com/mapfiles/ms/icons/snack_bar.png', 'http://maps.google.com/mapfiles/ms/icons/snack_bar.shadow.png', '', '59,32;0,0;16,34', 'rect;0,0,32,30', 1, 0, '0000-00-00 00:00:00', 6, 1, 0, '', '');
Jan

Re: Can't reinstall Phoca Maps

Posted: 15 Feb 2016, 14:26
by Rokell
Thanks Jan,
that did the job!
All the best
Roger

Re: Can't reinstall Phoca Maps

Posted: 17 Feb 2016, 03:05
by Jan
Ok