Hello!
I am having trouble upgrading component from Joomla 3 to 4.
The described upgrade process https://www.phoca.cz/documents/50-jooml ... o-joomla-4 was successful for the gallery, but no for the guestbook.
I had two guestbooks on Joomla 3, exported SQL
The Joomla 3 website was directly upgraded to Joomla 4 (not a fresh install)
Then I create two guestbooks with the same name and alias on Joomla 4 website. Go to phpMyAdmin to import the `sql`, but I get this mySql error:
#1050 - Table 'prefix_phocaguestbook_items' already exists
How could it be solved?
Thank you!
Guesbook upgrade from Joomla 3 to Joomla 4 fails
-
- Phoca Enthusiast
- Posts: 50
- Joined: 01 Sep 2012, 10:27
- Jan
- Phoca Hero
- Posts: 47794
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
Hi, you should add only data not the structure when importing
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 50
- Joined: 01 Sep 2012, 10:27
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
Hi!
Yes, the previous export was with structure, probably in the migration guide there is a typo:
Export Method: Custom
Tables: select only one table - jos_phocaguestbook_items, jos_phocaguestbook_logging
Output: Save output to a file
Format: SQL
Format-specific options: structure and data
Data dump options: both of the above
But, once I try to import only data, I receive this error:
`#1062 - Duplicate entry '1' for key 'prefix_phocaguestbook_items.PRIMARY'`
Yes, the previous export was with structure, probably in the migration guide there is a typo:
Export Method: Custom
Tables: select only one table - jos_phocaguestbook_items, jos_phocaguestbook_logging
Output: Save output to a file
Format: SQL
Format-specific options: structure and data
Data dump options: both of the above
But, once I try to import only data, I receive this error:
`#1062 - Duplicate entry '1' for key 'prefix_phocaguestbook_items.PRIMARY'`
-
- Phoca Enthusiast
- Posts: 50
- Joined: 01 Sep 2012, 10:27
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
UPDATE. I've exported old data with
Data creation options
Truncate table before insert option enabled. And imported it back to J4. Have I done it right?
But I have two old guestbooks with `11` and `14` IDs. With which query do I have to update imported data? New empty guestbooks have `17` and `18` ids
Data creation options
Truncate table before insert option enabled. And imported it back to J4. Have I done it right?
But I have two old guestbooks with `11` and `14` IDs. With which query do I have to update imported data? New empty guestbooks have `17` and `18` ids
- Jan
- Phoca Hero
- Posts: 47794
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
Hi, guestbooks are part of Joomla core com_categories table.
Guestbooks and entries are related through the ID of guestbook. So there are two possible way:
- you will truncate categories table and start to add new entries with new IDs and you will do this until you get the right IDs for guestbooks (not recommended)
- or you just correct the IDs in entries table - so they are related to new active guestbooks
E.g. from 11 tp 17 amd 14 to 18 in entries (phoca guestbook post table)
table - jos_phocaguestbook_items
column - catid
Jan
Guestbooks and entries are related through the ID of guestbook. So there are two possible way:
- you will truncate categories table and start to add new entries with new IDs and you will do this until you get the right IDs for guestbooks (not recommended)
- or you just correct the IDs in entries table - so they are related to new active guestbooks
E.g. from 11 tp 17 amd 14 to 18 in entries (phoca guestbook post table)
table - jos_phocaguestbook_items
column - catid
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Enthusiast
- Posts: 50
- Joined: 01 Sep 2012, 10:27
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
Thanks!
Resolved
Resolved
- Jan
- Phoca Hero
- Posts: 47794
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Guesbook upgrade from Joomla 3 to Joomla 4 fails
Ok
If you find Phoca extensions useful, please support the project