Page 1 of 1

phoca cart error Field 'user_id' doesn't have a default value

Posted: 29 Aug 2023, 11:59
by joaoserra69
Hello people!

when adding a new product and saving in phoca cart, i have this error: Field 'user_id' doesn't have a default value

Can anyone help me?

Thanks!

Phoca cart 4.08
PHP 8.0
joomla 4.3.4

Re: phoca cart error Field 'user_id' doesn't have a default value

Posted: 29 Aug 2023, 13:24
by Nidzo
Did you updated Phoca Cart from version 3 to version 4 or is it fresh version 4 for Joomla 4?
Try this: Go to Joomla System settings and check Database and Global Check-in. You can enter Database settings and update Phoca Cart database structure.

Re: phoca cart error Field 'user_id' doesn't have a default value

Posted: 21 Feb 2024, 20:47
by DiegoCZ
Ahoj Honzo, po aktualizace z Joomla 3 (Phoca Cart 3) na Joomla 4 (Phoca Cart 4) se mi nedaří uložit nový produkt ani vytvořit kategorii. Systém hlásí chybu Field 'user_id' doesn't have a default value. Poradíš, prosím? Rada od Nidzo nefunguje. Díky.

Re: phoca cart error Field 'user_id' doesn't have a default value

Posted: 21 Feb 2024, 22:59
by Benno
@DiegoCZ
the question is, did you follow this migration guide?
Scroll down to Phoca Cart:
https://www.phoca.cz/documentation/86-j ... o-joomla-4

Kind regards,
Benno

Re: phoca cart error Field 'user_id' doesn't have a default value

Posted: 21 Feb 2024, 23:27
by DiegoCZ
Dear Benno, I have updated the original Phoca Cart 3 with the lastest version of Phoca Cart 4. All seems to work well but only the issue with user_id occurs. I hoped I could fix this directly in the database... if it is possible. When I follow the migration guide adding new products works well and I can also import all the products but I completely loose the Phoca Cart general settings. Is there any way how to export/import these general settings too? Thank you very much!

Re: phoca cart error Field 'user_id' doesn't have a default value

Posted: 22 Feb 2024, 01:02
by Jan
Hi, you can export/import the options of Phoca Cart directly from database - they are stored in Joomla extension database table.

The columns can be manually updated too, see example:

viewtopic.php?t=64795

Jan