“#0 timeout-or-duplicate” error in VirtueMart

Do you see an error code like this “#0 timeout-or-duplicate” when sending messages from “Ask for Price” or “Ask a question about the product” VirtueMart forms? Then you’re on the right place.

#0 timeout-or-duplicate


This error message is actually from Recaptcha plugin, so it will appear only if we have Recaptcha enabled in the Virtuemart configuration, which is advisable because spammers will find you sooner or later.

It is important to mention that this happened only in Virtuemart. Joomla contact form and sending a test email from the Joomla Global configuration worked just fine. Actually, I also saw error message “Could not instantiate mail function”. I don’t recall anymore if that error showed in Joomla contact form or just in VirtueMart, but I fixed it simply by changing “Mailer” setting from “PHP Mail” to SMTP. After that I dind’t see this error message, but it still didn’t work from Virtuemart showing damn “#0 timeout-or-duplicate”.

After some investigation and experimenting I realized that the problem was that I had multiple captcha plugins enabled. So I had configuration like this:

My Joomla captcha plugins configuration

After disabling the second captcha plugin and leaving only the “Captcha – ReCaptcha” enabled sending of email started to work 🙂 It seems that VirtueMart is stupid enough to invoke each enabled captcha plugin, instead of only the one that is selected in the Joomla Global Configuration and that’s why we see this “duplicate” error.

#0 Empty solution not allowed

Then I wanted to see what would happen if I switch to “Invisible reCaptcha”. After that, sending email from Joomla contact form worked fine and it was cool that I don’t need to click “I am not a robot”. Unfortunately, it seems that Virtuemart doesn’t know how to use Invisible reCaptcha because it showed a new error “#0 Empty solution not allowed”. Umph!

#0 Empty solution not allowed

#0 invalid-keys

OK, then I tried some other combinations, e.g. enabling both “Captcha – ReCaptcha” and “Invisible reCaptcha” with a small hope that VirtueMart will use “Captcha – ReCaptcha” and that the Joomla contact form will use “Invisible reCaptcha” (as it was selected as default in the Global configuration). Needless to say that it didn’t work. This time it showed “#0 invalid-keys” error:

#0 invalid-keys

OK, after wasting 2.5 hours on that, it was time to stop experimenting and stick to the only solution that worked, i.e. enabling only “Captcha – ReCaptcha” and poor users will always need to confirm that they are not robots. I guess we all feel like robots sometimes when working on super-boring tasks, so at least this thing will remind us to stop being robots anymore 🙂

You may wonder why this 3rd captcha plugin “The new Recaptcha” in my configuration that caused me all this trouble. Well, this was downloaded from the web because of one experiment, but this plugin is not really needed because Joomla’s built in plugins seem to work just fine.