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

Phoca Cart - complex e-commerce extension
joaoserra69
Phoca Member
Phoca Member
Posts: 18
Joined: 08 Jul 2016, 00:05

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

Post 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
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 272
Joined: 07 Nov 2018, 14:55

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

Post 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.
DiegoCZ
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Jun 2020, 08:05

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

Post 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.
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9143
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

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

Post 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
DiegoCZ
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 19 Jun 2020, 08:05

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

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47916
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
Post Reply