Page 1 of 1
Error when creating a marker
Posted: 14 Jul 2023, 13:32
by p260953
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?
Re: Error when creating a marker
Posted: 14 Jul 2023, 13:59
by Benno
Hi,
Is there a way to edit the database?
Can I export the markers and import them again later?
See:
https://www.phoca.cz/documentation/86-j ... o-joomla-4 Scroll down to Phoca Maps section.
Kind regards,
Benno
Re: Error when creating a marker
Posted: 16 Jul 2023, 09:39
by p260953
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.
Re: Error when creating a marker
Posted: 19 Jul 2023, 23:12
by Jan
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
Re: Error when creating a marker
Posted: 20 Jul 2023, 13:54
by p260953
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!
Re: Error when creating a marker
Posted: 20 Jul 2023, 17:56
by Jan
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
Re: Error when creating a marker
Posted: 21 Jul 2023, 11:02
by p260953
Thank you Jan ! It works !
Re: Error when creating a marker
Posted: 22 Jul 2023, 15:17
by Jan
Great to hear it.
Jan
Re: Error when creating a marker
Posted: 12 Dec 2023, 23:44
by mikaelbjors
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
Re: Error when creating a marker
Posted: 14 Dec 2023, 18:47
by Jan
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