How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Phoca Guestbook - creating guestbooks in Joomla! CMS
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Post by Jan »

Hi, thank you very much for the guide.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Post by Jan »

Hi, thank you again for the guide, I have used it here:
https://www.phoca.cz/documents/50-phoca/ ... o-joomla-3

Thank you, Jan
If you find Phoca extensions useful, please support the project
carsten888
Phoca Member
Phoca Member
Posts: 35
Joined: 22 Oct 2008, 12:11
Location: Tilburg, Holland
Contact:

Re: How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Post by carsten888 »

@was_nun?
thank you very much. You saved me.

This sort of script could be integrated in the install.script.php of the component.
carsten888
Phoca Member
Phoca Member
Posts: 35
Joined: 22 Oct 2008, 12:11
Location: Tilburg, Holland
Contact:

Re: How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Post by carsten888 »

This script needs one more query.

The root-post in the items table should have catid 0, else when you first post, an update script is triggered to insert the row and fatally fails because it already has the same id. guestbook model function checkReference.

So

Code: Select all

UPDATE `YOURPREFIX-VERSION3_phocaguestbook_items` SET `catid` = '0' WHERE `id`=`1`;
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: How to migrate Phoca Guestbook v2.0.7 to v3.0.1

Post by Jan »

Hi, yes, you right, thank you very much for this info, the first entry is done by installation of Phoca Guestbook 3 and will be overwritten by migration when setting new catid. So it needs to be set back to zero.

Thank you, I have updated it here:
https://www.phoca.cz/documents/50-phoca/ ... o-joomla-3

Jan
If you find Phoca extensions useful, please support the project
Post Reply