XF 2.3 Register overlay not loading - keeps on redirecting instead

wg123

New member
Licensed customer
In my registration notice, I have a button with data-xf-click="overlay" applied, which is supposed to open the register modal on that page. What is currently happening, is that the button redirects to the /forum/register/ page, instead of opening the page inside the modal. Once the cache is cleared, the overlay works as expected, but the moment you navigate to a new page and try to register again, it keeps redirecting. We have tried turning off our caching in cloudflare as well, to check if it might be caching some old XenForo javascript files, but that didn't work either.

Any ideas what might be causing this? It is not limited to only the register notice, but also happens on the default register button.
 
This is almost always caused by JavaScript failing to initialize on the page. When XenForo's JS doesn't load properly, data-xf-click="overlay" gets ignored and the browser just follows the href as a normal link — hence the redirect.
A few things to check:
1. Cloudflare Rocket Loader — if you're using Cloudflare, go to Speed > Optimization and make sure Rocket Loader is OFF. It defers JS loading and breaks XenForo's overlay system. This is the most common cause.
2. Browser console errors — open DevTools (F12) and check the Console tab for JavaScript errors on page load. Any error that breaks XF's JS initialization will cause overlays to fail.
3. Test with default style + addons disabled — if it works with the default style, the issue is in your custom style or an addon's JS conflicting.
4. Cloudflare JS minification — also under Speed > Optimization, try disabling JavaScript minification. XenForo already minifies its own JS, and double-minification can break things.
The fact that it works after clearing cache but breaks again suggests something is re-caching a broken JS bundle. If you're using Cloudflare, try purging cache there too (not just browser cache).
 
Back
Top Bottom