I have just migrated my site to Joomla 4 and upgraded the old version of Phoca Maps to Joomla 4. Since I have over 100 markers, I wanted to avoid a clean reinstall. But now I have the problem that when I create new markers I get the following error message:
Save failed. Error: Field 'params' does not have a default value.
Probably there are problems with the database that certain fields do not exist or have wrong default values. How can I solve this without uninstalling and reinstalling?
Is there a way to edit the database?
Can I export the markers and import them again later?
Error when creating a marker
-
- Phoca Newbie
- Posts: 4
- Joined: 14 Jul 2023, 13:19
- Benno
- Phoca Hero
- Posts: 9428
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Error when creating a marker
Hi,
Kind regards,
Benno
See: https://www.phoca.cz/documentation/86-j ... o-joomla-4 Scroll down to Phoca Maps section.Is there a way to edit the database?
Can I export the markers and import them again later?
Kind regards,
Benno
-
- Phoca Newbie
- Posts: 4
- Joined: 14 Jul 2023, 13:19
Re: Error when creating a marker
I understand the tip to copy the database from JEM 2.x to JEM 4, but would that solve my problem? Actually, the database is already there with all the previous markers and it works. Only new markers cannot be added. It comes to the described error message! Has the structure of the JEM database changed? If so, importing the old database would not help.
- Jan
- Phoca Hero
- Posts: 48361
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error when creating a marker
Hi, when you migrate based on the guide, then all columns get new format and such error does not occurr. If not then the column needs to be edited directly in the database.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 14 Jul 2023, 13:19
Re: Error when creating a marker
Ok, which columns are new in the version for joomla 4? Are there any columns that change there format. If I know them I can add them manually to the database. Without this information. Sorry for my confusion!
- Jan
- Phoca Hero
- Posts: 48361
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error when creating a marker
Hi,
there are no new columns, but for some columns the type changed in Joomla 4, e.g.
Joomla 3 or 4:
`params` text (which in fact means text default null
Joomla 2.5:
`params` text NOT NULL,
So the params needs to be changed, try to run this SQL command in your e.g. phpMyAdmin (change the prefix _jos to yours):
ALTER TABLE `jos_phocamaps_map` CHANGE `params` `params` text;
ALTER TABLE `jos_phocamaps_marker` CHANGE `params` `params` text;
ALTER TABLE `jos_phocamaps_icon` CHANGE `params` `params` text;
Jan
there are no new columns, but for some columns the type changed in Joomla 4, e.g.
Joomla 3 or 4:
`params` text (which in fact means text default null
Joomla 2.5:
`params` text NOT NULL,
So the params needs to be changed, try to run this SQL command in your e.g. phpMyAdmin (change the prefix _jos to yours):
ALTER TABLE `jos_phocamaps_map` CHANGE `params` `params` text;
ALTER TABLE `jos_phocamaps_marker` CHANGE `params` `params` text;
ALTER TABLE `jos_phocamaps_icon` CHANGE `params` `params` text;
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 14 Jul 2023, 13:19
Re: Error when creating a marker
Thank you Jan ! It works !
- Jan
- Phoca Hero
- Posts: 48361
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error when creating a marker
Great to hear it.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 03 Aug 2018, 10:57
Re: Error when creating a marker
I have the same problem. But this solution didn't help because of another error when trying to run that SQL:
ALTER TABLE `sfro_phocamaps_map` CHANGE `params` `params` text;
MySQL said:
#1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'checked_out_time' at row 1
ALTER TABLE `sfro_phocamaps_map` CHANGE `params` `params` text;
MySQL said:
#1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'checked_out_time' at row 1
- Jan
- Phoca Hero
- Posts: 48361
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Error when creating a marker
Hi, where do you get this error: "#1292 - Incorrect datetime value: '0000-00-00 00:00:00' for column 'checked_out_time' at row 1" in which action. When altering the table?
Did you follow the guide for the migration, so new tables and columns will be created?
Jan
Did you follow the guide for the migration, so new tables and columns will be created?
Jan
If you find Phoca extensions useful, please support the project