News:

Looking for documentation? Take a look on our wiki

Main Menu

Error vmError: Plugin plgVmCustom WHEN a product is saved

Started by extonjaez, April 27, 2022, 19:31:37 PM

Previous topic - Next topic

extonjaez

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

Jumbo!

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.

extonjaez

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

GJC Web Design

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)
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Roderic

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.

Milbo

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"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/