Question about error "WDE0025."

Product: Wix Studio Velo

Question: Question about error “WDE0025.”

I want to resolve the following error:

Error fetching member data: Error: WDE0025: The MembersData collection does not exist. You cannot work with a collection using the Data API before it is created in the Editor.

I have added a collection called “MembersData” in the CMS. The collection is set to public.

The issue occurs with the following code:


import wixUsers from ‘wix-users’;
import wixData from ‘wix-data’;

$w.onReady(function () {

let user = wixUsers.currentUser;
let userId = user.id;

wixData.query(“MembersData”)
.eq(“id”, userId)

.find()
.then((results) => {
  if (results.items.length > 0) {
    let memberData = results.items[0];
    
    if (memberData.point) {
      $w("#text9").text = memberData.point.toString();  
    } else {
      console.log("No point data found for this member");
    }
  } else {
    console.log("No member data found");
  }
})
.catch((err) => {
  console.error("Error fetching member data:", err);
});

});

The members data collection is part of the Wix Members area and is created automatically when you add the members area. A custom CMS collection you have created will not be recognized by these API’s.

If you have added the members area and are still seeing this error, you can read how to report a bug here Wix Studio - How to report a bug

in addition wix-users is deprecated and i would suggest using the wix members api Velo Wix Members Backend Introduction | Velo

1 Like