vmTable store insertObject when try to use "Notify me"

Started by scriner, December 06, 2022, 11:10:19 AM

Previous topic - Next topic

scriner

Hello

J 4.2.5, VM / 4.0.8 10748

When I try to use "Notify me" function, after adding email nad press button I got message that "vmTable store insertObject" and "Notify me successfully saved", but no email added to notify list.

I have this error only on J4. There are no errors on J3 with same version VM. I see this error during monthes from first VM 4 release. I thought that it is already fixed but still see it now.

I have clean install of VM and don't think that it is problem of my website. Any other have this error?


Milbo

Thank you for your bug report. You checked with j3 that helped me a lot. If you would have logged in, you even would have get the real Error message:

Quote
vmError: vmTable store insertObject #__virtuemart_waitingusers Incorrect datetime value: '' for column `vm3j4_db`.`pa3b1_virtuemart_waitingusers`.`notify_date` at row 1 INSERT INTO `pa3b1_virtuemart_waitingusers` (`virtuemart_waitinguser_id`,`virtuemart_product_id`,`virtuemart_user_id`,`notify_email`,`notified`,`notify_date`,`ordering`,`created_on`,`created_by`) VALUES ('0','156','369','admin@test.local','0','','0','2022-12-06 20:43:26','369')

is fixed, just a simple line for j4 in the constructor of the table

$this->setDateFields(array('notify_date'));
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Acutally. I think the admin message should be even in your VM logs. :-) Just "for your information" in the future and with you, I mean, anyone reading here :-)
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

scriner

Quote from: Milbo on December 06, 2022, 21:45:09 PM
Thank you for your bug report. You checked with j3 that helped me a lot. If you would have logged in, you even would have get the real Error message:

Quote
vmError: vmTable store insertObject #__virtuemart_waitingusers Incorrect datetime value: '' for column `vm3j4_db`.`pa3b1_virtuemart_waitingusers`.`notify_date` at row 1 INSERT INTO `pa3b1_virtuemart_waitingusers` (`virtuemart_waitinguser_id`,`virtuemart_product_id`,`virtuemart_user_id`,`notify_email`,`notified`,`notify_date`,`ordering`,`created_on`,`created_by`) VALUES ('0','156','369','admin@test.local','0','','0','2022-12-06 20:43:26','369')

is fixed, just a simple line for j4 in the constructor of the table

$this->setDateFields(array('notify_date'));


Hello Milbo,

Thanks for information, I will check logs first now.

But, please, say which exact file and which line needs to fix?

2022-12-06 09:42:08 ERROR vmError: vmTable store insertObject #__virtuemart_waitingusers Field 'notify_phone' doesn't have a default value INSERT INTO `joom_virtuemart_waitingusers`
(`virtuemart_waitinguser_id`,`virtuemart_product_id`,`virtuemart_user_id`,`notify_email`,`notified`,`notify_date`,`ordering`,`created_on`,`created_by`) VALUES
('0','17','0','scriner@mail.ru','0','','0','2022-12-06 09:42:08','0')<pre>#0  vmError() called at [/var/www/vhosts/v-9789.webspace/www/kingsmith.kz/administrator/components/com_virtuemart/helpers/vmtable.php:1305]
#1  VmTable->store() called at [/var/www/vhosts/v-9789.webspace/www/kingsmith.kz/administrator/components/com_virtuemart/models/waitinglist.php:146]
#2  VirtueMartModelWaitingList->adduser() called at [/var/www/vhosts/v-9789.webspace/www/kingsmith.kz/components/com_virtuemart/controllers/productdetails.php:349]
#3  VirtueMartControllerProductdetails->notifycustomer() called at [/var/www/vhosts/v-9789.webspace/www/kingsmith.kz/libraries/src/MVC/Controller/BaseController.php:672]
#4  Joomla\CMS\MVC\Controller\BaseController->execute() called at [/var/www/vhosts/v-9789.webspace/www/kingsmith.kz/components/com_virtuemart/virtuemart.php:128]
</pre>

It may be vmtable.php? I tried to fix by myself, but have no success.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/