Hi
I am unable to install phocadownload on my site. It give me the error as below:
Warning
JInstaller: :Install: Error SQL Duplicate entry '1' for key 'PRIMARY'
Extension Install: SQL error processing query: DB function failed with error number 1062
Duplicate entry '1' for key 'PRIMARY'
SQL =
INSERT INTO `#__phocadownload_styles` (`id`, `title`, `alias`, `filename`, `menulink`, `type`, `published`, `checked_out`, `checked_out_time`, `ordering`, `params`, `language`) VALUES
(1, 'Phocadownload', 'phocadownload', 'phocadownload.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 1, NULL, '*'),
(2, 'Rating', 'rating', 'rating.css', NULL, 1, 1, 0, '0000-00-00 00:00:00', 2, NULL, '*'),
(3, 'Button', 'button', 'button.css', NULL, 1, 0, 0, '0000-00-00 00:00:00', 3, NULL, '*'),
(4, 'Button (Rounded Corners)', '', 'buttonrc.css', NULL, 1, 0, 0, '0000-00-00 00:00:00', 4, NULL, '*'),
(5, 'Default', 'default', 'default.css', NULL, 2, 1, 0, '0000-00-00 00:00:00', 1, NULL, '*'),
(6, 'Bootstrap', '', 'bootstrap.min.css', NULL, 1, 0, 0, '0000-00-00 00:00:00', 5, NULL, '*');
Here is a screenshot:: https://screenshot.net/e8mgnad
Please help me resolve this. Thanks.
unable to install "phocadownload"
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: unable to install "phocadownload"
Hi, seems like there was some instance of Phoca Download on your site 
If you want to reinstall Phoca Download you need to clean old instance on your site (usually it is removed when uninstalling or when only upgrading it is not change)
So if you need to install it new (ALL OLD DATA IN PHOCA DOWNLOAD WILL BE LOST), then see this article:
https://www.phoca.cz/phocagallery/16-jo ... m-manually
to remove the component completely from the system and to be able to install it again.
Jan

If you want to reinstall Phoca Download you need to clean old instance on your site (usually it is removed when uninstalling or when only upgrading it is not change)
So if you need to install it new (ALL OLD DATA IN PHOCA DOWNLOAD WILL BE LOST), then see this article:
https://www.phoca.cz/phocagallery/16-jo ... m-manually
to remove the component completely from the system and to be able to install it again.
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 17 Sep 2016, 08:25
Re: unable to install "phocadownload"
Thanks for the response Jan. I was a happy user of Phoca Download on my earlier site that was on J2.5. I have been facing this issue ever since I migrated it to J3. Will try your suggestions and see if it helps. Isn't there a script / automatic way to do this?
UPDATE: Tried running the queries you suggested.
# MySQL returned an empty result set (i.e. zero rows).
Warm regards
Rajesh
UPDATE: Tried running the queries you suggested.
# MySQL returned an empty result set (i.e. zero rows).
Warm regards
Rajesh
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: unable to install "phocadownload"
Did you set correctly the "com_phocadownload" string in the queries, did you set correctly the prefix of your database, and did you remove all the folders and files on your server (phocadownload files and folders)?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 17 Sep 2016, 08:25
Re: unable to install "phocadownload"
I am not an expert in performing SQL queries, but I think I did. And yes, I removed all the folders/files on the server !!
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: unable to install "phocadownload"
Hmmm, when everything is removed (even from database), the it is not possible to get the same mysql error because there is no table which can include the same row (when the table does not exist, there cannot exist a row of this table) 
Jan

Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 17 Sep 2016, 08:25
Re: unable to install "phocadownload"
I can share my test site admin details & FTP details to check. If you can spare the time & effort. It would mean a lot.
regards
regards
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: unable to install "phocadownload"
Hi, do you get the same error after cleaning all the data in database?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 8
- Joined: 17 Sep 2016, 08:25
Re: unable to install "phocadownload"
I don't know if the database was cleaned properly. I ran the queries you suggested. I am not conversant with databases.
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: unable to install "phocadownload"
I mean, if you still get the same error message after the completely removing of component data ( https://www.phoca.cz/documents/16-jooml ... m-manually )
Jan
Jan
If you find Phoca extensions useful, please support the project