Hello
When in Virtuemart Backend i saved a product, i have now this sentences
Error
vmError: Plugin plgVmCustomProductbundles must be updated, called in vmcustomplugin.php OnStoreProduct
vmError: Plugin plgVmCustomCustomfieldsforall must be updated, called in vmcustomplugin.php OnStoreProduct
vmError: Plugin plgVmCustomEmbedvideo must be updated, called in vmcustomplugin.php OnStoreProduct
vmError: Plugin plgVmCustomVm2wishlists must be updated, called in vmcustomplugin.php OnStoreProduct
Thanks for your help
regards
Arnaud
System Information
Virtuemart Version 4.0.0.10645 or 3.8.9.10622
PHP Built On Linux s22095112 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
Database Type mysql
Database Version 5.5.5-10.2.43-MariaDB
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.4.29
Web Server Apache
WebServer to PHP Interface fpm-fcgi
Joomla! Version Joomla! 3.10.8 Stable [ Daraja ] 30-March-2022 13:28 GMT
Joomla! Platform Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
The errors are generated by 3rd party extensions such as product bundle, custom fields for all, video custom fields etc. You need to contact the respective extension developers and ask them to fix the errors.
Quote from: Jumbo! on April 27, 2022, 20:04:05 PM
The errors are generated by 3rd party extensions such as product bundle, custom fields for all, video custom fields etc. You need to contact the respective extension developers and ask them to fix the errors.
Ok.
But why now?
This happens only after a new VM updates.
What is the difference in code in the new updates with before?
Many thanks
Best regards
Possibly a function has changed
e.g. I see in the repository for custom plugs
Attention function plgVmOnStoreProduct($data, $plugin_param) changed to function plgVmOnStoreProduct($data, $plugin_param, $key)
or
Fixed some language files to work with PHP8. Any sprintf placeholders must have format %1$s (%2$s respectivly)
Yes, it is also mentioned in the news for VirtueMart 4. Most time it is enough to add the ,$key as 3rd parameter. Thats it.
I tried to fix this for customfields4all plugin,
In the file /plugins/system/customfieldsforallbase/customfieldsforallbase.php
On line 250:
From
public function plgVmOnStoreProduct($data, $plugin_param)
to
public function plgVmOnStoreProduct($data, $plugin_param, $key)
Unfortunately that didn't get rid of the error. It seems however that the error doesn't really impact the functionality.
yes, you must also update the line with parent::OnStoreProduct to have the key, otherwise the function gets -1 for the key and says "there is no key, man"