Error: Call to undefined method VmConfig::updateDbEntry() while updating to VM4.

Started by cdbaron88, March 14, 2024, 14:33:06 PM

Previous topic - Next topic



I'm trying to upgrade from J3.10.12 and VM3.8.8 10472 to VM4.2.6 10972 using both PHP 7.4.3 and PHP 8.

And I'm having some issues that are driving me a bit crazy  :'(

I'm updating using the file com_virtuemart., and the result is:

Error: Call to undefined method VmConfig::updateDbEntry()

If I then repeat the update, everything seems to go well... but I don't trust it.

I don't like updating in production with error messages without knowing exactly what's happening on the first and second attempt. Something may not be properly updated.

What's really curious is that I have multiple copies from different days of the entire website with the only difference being that I've been updating some modules like AwoRewards, Custom Fields For All, VP One Page Checkout, and with the copy before these updates, I don't have any problems.

I've been searching the forum and I found some similar issues:
But I can't find enough information to understand exactly what's going on.

Digging a bit deeper (I'm a total newbie with PHP), I see the following:
- The error occurs in the file: administrator/components/com_virtuemart/models/config.php Line 764 (this file is already updated to VM4)
- VmConfig::updateDbEntry() doesn't exist in VM3 but it does in VM4. In fact, when the error occurs, VMConfig is already updated and updateDbEntry exists, but the error still occurs.

What could be happening?
How is it possible that the installation of a module breaks the VM update?

Hopefully, someone can help me out.



Can no one help me?  :'(

I have VirtueMart Membership – Bronze. Should I open a support ticket?



Hello Carlos,
thank you for the ticket and post, so I can answer here. The root problem is, that the installation processs loaded the old vmConfig without the new function. Doing the update again is exactly the right way to go and is secure.

Why it is not possible to load directly the new config. The problem here are different plugins, which load the config, before the installation is executed. On the other hand that is often our own plugin, which we need to update vm plugins (it loads the vm config for them, haha).
We did not find a proper way to solve this. Usually we try to have such changes only between major versions.
Should I fix your bug, please support the VirtueMart project and become a member
Extensions approved by the core team:


Now I understand the problem, and everything makes sense.

Additionally, thanks to the explanations, I now know why initially all the update tests worked fine and then, without explanation, started to fail.

When the update was working well, I had disabled the "System - VP Conversion Tracking" Plugin from VirtuePlanet. Surely, @Jumbo! could find the explanation 😉

Although it's safe to repeat the update to ensure completion, I think I'll temporarily deactivate this plugin.

Thank you.


It always makes sense to run an update twice, in special on a live server. Sometimes a file is not updated, because just in use.
Should I fix your bug, please support the VirtueMart project and become a member
Extensions approved by the core team: