Cannot read properties of undefined (reading 'data')" in the file platformized-data-provider.ts within the @wix/wix-data-platformized-provider module

Question: Why am I receiving a TypeError “Cannot read properties of undefined (reading ‘data’)” in the file platformized-data-provider.ts within the @wix/wix-data-platformized-provider module?

Product: Wix Studio

What are you trying to achieve: I am trying to perform data operations (insert, update) using the Wix Data Platformized API. The error occurs when the code attempts to access a ‘data’ property, which seems to result from an undefined object, preventing the operation from completing successfully.

What have you already tried:

  1. I’ve confirmed that the structure of the object being passed to the function is complete and all required fields are correctly formatted.
  2. I have ensured that the collection name is correct and that the collection indeed exists in my Wix site database.
  3. I’ve double-checked that any IDs or references used in the operation are existing and valid.

Additional information: The error seems to be triggered within the internal workings of the Wix module, specified at this path: /dynamic-modules/edm_root/f52084ef-6c55-4184-ab0d-9fe852dc683f/node_modules/@wix/wix-data-platformized-provider/src/platformized-data-provider.ts. Since this is part of an internal module, I’m unable to modify it directly. It’s possible that this is a bug or a data integrity issue on the platform side. Here is a snippet of the code that leads to the error:

Problem solved.

When you encounter this type of error, it’s because you’re using queryReferenced, which causes an error when used in

routers.js