6 common Wix Velo errors and how to fix them
Short answer
Most Velo errors come from a few causes: running dataset code before the dataset has loaded, using a collection that doesn't exist or is named differently (WDE0025), missing collection permissions (WDE0027), mismatched element IDs, and calling backend code from a file the frontend can't reach. Each has a specific fix below.
These are the errors I see most often when clients send me a broken Wix site. They apply to Velo in the Wix Editor and in Wix Studio.
1. Dataset code runs before the data has loaded
Symptoms: getCurrentItem() returns nothing, a repeater stays empty, or you see "operation not allowed on an unconfigured dataset".
Cause: most dataset functions only work after the dataset has loaded its data. If you call them from the page's onReady(), the data may not be there yet.
Fix: wrap the call in the dataset's own onReady() handler, inside the page's onReady():
$w.onReady(function () {
$w("#myDataset").onReady(() => {
const item = $w("#myDataset").getCurrentItem();
$w("#title").text = item.title;
});
});
You only need this inside the page's onReady(). Code that runs later, such as a button click handler, can assume the dataset has already loaded. Also, don't put await in front of the dataset's onReady(), and don't chain .then() onto it: it's an event handler, not a promise.
2. WDE0025: the collection does not exist
Cause: the collection name in your code doesn't match a collection on the site. Common reasons are a typo, a different capitalisation, using the display name instead of the collection ID, or querying a Wix app collection with the wrong ID.
Fix: open the CMS, select the collection, and copy its exact ID from the collection settings. For app collections, such as Members or Stores, use the IDs listed in the Velo documentation rather than the names you see in the dashboard.
3. WDE0027: the current user doesn't have permission
Symptoms: everything works when you preview the site, but visitors see empty pages or failed form submissions.
Cause: in Preview you're treated as the site admin. Real visitors only get the permissions set on the collection.
Fix: don't open the collection to "Anyone" just to make the error go away, because that exposes your data. Instead, set the collection permissions to what visitors genuinely need. If visitors must trigger an action they shouldn't be able to do directly, move that code into a backend web method that checks who's calling, and run the data operation there.
4. "Cannot read properties of undefined" or "is not a function" on an element
Cause: the element ID in your code doesn't exist on the page. This happens after renaming an element, deleting it, copying code from another page, or when an element is hidden or removed on mobile.
Fix: click the element, check its ID in the properties panel, and update the code. The code panel underlines IDs it can't find on the page, so look for those warnings first.
5. Backend function can't be called from the page
Cause: plain .js files in the backend can only be called from other backend files. To call backend code from a page, it must be in a web module.
Fix: use a .web.js file and wrap the function in webMethod() with a permission level. The older .jsw web modules are deprecated, although existing ones keep working.
// backend/quotes.web.js
import { Permissions, webMethod } from "wix-web-module";
export const getQuote = webMethod(Permissions.Anyone, async (size) => {
return size * 25;
});
// Page code
import { getQuote } from "backend/quotes.web";
$w.onReady(async () => {
$w("#price").text = String(await getQuote(4));
});
Choose the strictest permission that works: Anyone, SiteMember or Admin. Note that backend console.log output doesn't appear in your browser console on the live site; use the site's logs instead.
6. Code works in Preview but not on the live site
Work through this list in order:
- Did you publish after the last change? Preview shows unpublished code; the live site doesn't.
- Collection permissions (see WDE0027 above).
- Elements hidden or removed on mobile.
- Exported event handlers that no longer match an element after renaming. Prefer attaching handlers in code, such as
$w("#button1").onClick(...), insideonReady(). - Browser caching. Test in a private window.
When to get help
If your site uses several datasets, backend code and app collections together, errors often interact, and fixing one exposes the next. That's the kind of job I take on most weeks, usually at a fixed price after looking at the code.
Sources
More guides
- Wix Editor vs Wix Studio vs Wix Harmony: which should you use in 2026?
- Wix pricing 2026: what a Wix website really costs
- How to add a custom calculator to a Wix site
- WordPress to Wix migration checklist: move without losing your SEO
- Wix website not showing on Google? Why, and how to fix it
- Wix Studio vs Squarespace: which should you choose?
- How to speed up a slow Wix website
- Wix vs WordPress for small businesses
- How to hire a Wix developer: 10 questions to ask first
- Wix vs Webflow: should you build on Wix Studio or Webflow?
- Wix vs Shopify: which is better for your online store?
- How much does a Wix online store cost in 2026?
- Wix domains: what they cost and how to connect one you already own
- Wix SEO: a 20-step checklist to get your site found
- Is Wix good for SEO in 2026?
- How to take orders on Wix without online payment
- How much does Wix SEO cost?
- Wix delivery ordering: slots, postcode zones and subscription boxes
- Is your Wix site accessible? The rules, and how to fix it
- Wix Bookings for small businesses: what it can and can't do
- Wix Multilingual: a site in two or more languages, SEO included
- Wix members areas and paid content: memberships, paywalls and courses
- Selling on Wix in the UK: payment fees, VAT, shipping and store limits
- Wix forms: fix missing notifications, automate follow-ups and connect your CRM
- A Wix restaurant website: online ordering, menus and table reservations
- Local SEO on Wix: getting found in Google Maps and "near me" searches
- Selling event tickets on Wix: fees, features and limits
- Cookie banners and GDPR on a Wix site: UK and EU rules for 2026
- Wix Studio vs Framer: which should you build on?
- Can you export a Wix site? What you can take with you if you leave
- My web designer owns my Wix site: how to get it transferred to you
- Can I change my Wix template after publishing?
- Is Wix Velo being discontinued?