Configuration

ReCaptcha Loading Issue on Joomla 3 Sites

ReCaptcha Loading Issue on Joomla 3 Sites

ReCaptcha on a Joomla 3 site that spins forever after the checkbox is usually a script conflict. How to find the cause and get the forms working again.

A client reported that their ReCaptcha continuously loads without ever completing when users try to reset passwords, retrieve usernames, or submit any form that has ReCaptcha enabled. After the visitor clicks the “I’m not a robot” checkbox, the verification widget simply spins forever, leaving the user stranded and the form unusable.

Root Cause

The problem stems from a hidden conflict between Joomla 3’s legacy JavaScript framework and Google’s current ReCaptcha libraries. All Joomla 3 releases, including the very last stable version, 3.10.12, still ship the old MooTools core (v1.4.x) and the accompanying “more” package. Google discontinued support for MooTools many years ago, favouring modern, lightweight solutions based on vanilla JavaScript or jQuery. When a page loads both MooTools and the ReCaptcha script, the two libraries clash: MooTools overwrites certain global objects that ReCaptcha expects, causing the widget to stall in its loading animation.

In Joomla 4 this issue disappears because the core has been rewritten to use jQuery (and, where possible, pure JavaScript) only. The legacy Joomla 3 environment, however, still injects MooTools automatically, even if no extension on the site actually needs it. As a result, any Joomla 3 site that relies on Google’s ReCaptcha v2 or v3 is vulnerable to the “infinite loading” symptom.

Solution

The most reliable way to fix the issue is to stop MooTools from being added to the page when it isn’t required by any other component. This can be achieved with a tiny tweak to the template’s index.php file. By unsetting the two MooTools script entries from Joomla’s internal script array, you prevent the browser from downloading and executing them, thereby removing the conflict.

Follow these steps carefully:

  1. Locate the template’s index.php file. This file resides in templates/your_template_name/. Open it with a code editor (e.g. VS Code, Sublime Text, or even Notepad++).
  2. Find the line that outputs the document head. It will look like this:
    jdoc:include type="head"
  3. Insert the removal code directly after that line. The code should be placed on a new line, exactly as shown below:
    unset($this->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']);
    unset($this->_scripts[$this->baseurl.'/media/system/js/mootools-more.js']);
    
  4. Save the file and clear Joomla’s cache. Go to System → Clear Cache and purge both the site and the administrator caches. Then, refresh the front‑end page to verify that the two MooTools files are no longer listed in the page source.

That’s it, the ReCaptcha widget should now load normally and the “I’m not a robot” checkbox will complete the verification without hanging.

Why this works

Removing the MooTools scripts eliminates the JavaScript namespace clash that prevented ReCaptcha from initialising. Without MooTools, the global objects that the ReCaptcha script depends on remain untouched, allowing the Google API to render the widget synchronously and complete the challenge.

Additional considerations

  • Audit other extensions. Before you permanently discard MooTools, double‑check that no third‑party plugin, module or component still requires it (for example, older sliders, galleries or custom form fields). If you discover a dependency, either replace the extension with a modern jQuery‑based alternative or update it to a version that is Joomla 4‑compatible.
  • Alternative temporary fixes. For sites that cannot drop MooTools completely, you can try tweaking the ReCaptcha HTML attributes, adding data-theme="light" or data-size="compact", to force a slightly different loading behaviour. However, this is only a stop‑gap measure; the underlying conflict will still exist and may re‑appear after a Google API update.
  • Testing is essential. After applying the script removal, run a full suite of checks:
    • Submit the password‑reset form and confirm the ReCaptcha validates correctly.
    • Test the “Forgot Username” flow, the contact form, and the user registration page.
    • Open the page source (Ctrl U) and verify that mootools-core.js and mootools-more.js are absent.
    • Use the browser’s developer console to ensure no JavaScript errors are thrown during page load.
  • Future‑proofing. If you are planning a migration to Joomla 4, this is an excellent opportunity to tidy up legacy code. Removing MooTools now reduces the amount of refactoring required later and ensures a smoother transition to the newer, more secure framework.

In summary, the ReCaptcha loading loop on Joomla 3 is a classic “legacy library conflict” problem. Once Joomla 3 shipped with MooTools v1.4.x, Google’s ReCaptcha v2 and v3 stopped recognising the outdated environment, causing the widget to spin indefinitely. The quickest and most robust fix is to strip MooTools from the page when it isn’t needed, using the snippet shown above. Combine this with a careful audit of extensions, thorough testing, and, where possible, an upgrade path to Joomla 4, and you’ll restore full functionality to every form that relies on ReCaptcha.

Stuck on something else?

Doctor Joomla is a project of Cloudfaction, a Dutch agency building and maintaining Joomla sites since 1999. The articles are made with the help of AI, so tell us if something does not match your screen. Mail info@cloudfaction.nl if you want someone to look at yours.

Rather have someone look at it

Doctor Joomla is a Cloudfaction project.

A Dutch agency that has been building and running Joomla sites since 1999. If your site needs more than an article can fix, get in touch.