DatasetError: Operation (onReady) not allowed on an unconfigured dataset

I have looked at other samples of this problem, but I think this one is unique. Following is very simple code:
import wixData from ‘wix-data’;
$w.onReady( function () {
//TODO: write your page related code here…
$w(“#regRepeater”).onReady( () =>{
console.log(“Dynamic dataset ready”);
});
});
This is a registration form repeater app and I get the DatasetError only in preview mode with no log. In publish mode the app works perfectly, printing the console log. Anybody have an idea? I’m uncomfortable with this even if the problem is limited to preview mode.

If you are simply wanting your dataset to load with your page, then just use the code for it.

import wixData from 'wix-data';

$w.onReady( () => {
$w("#myDataset").onReady( () => {
console.log("The dataset is ready");
});
});

Just make sure that you have the dataset setup on your page properly and that the name of your dataset is #regRepeater

Thank you again, givemeawhiskey, unfortunately the problem still exists, still complaining about an unconfigured dataset in preview mode only. The dataset name must correct, as it works fine in publish mode. Your code is the only Corvid code in the app, so I’m guessing maybe it’s some weird timing problem during load?

Please post the editor URL of your site. Only authorized Wix personnel can get access to your site in the editor. Please include the name of the page involved.

The URL of the Central Oregon Master Gardener Assoc. is
https://editor.wix.com/html/editor/web/renderer/edit/6022af2a-dfbd-4462-a0ad-8c3b121a4c3a?metaSiteId=6afbb9b6-acad-4782-a322-dada0338cd49&editorSessionId=ff0e1379-4cc5-45ca-8a36-cdd3106107c4&referralInfo=dashboard
The page in question is ‘Reginfo2020 RegRepeater’. The database just contains test profiles.
Thank you for your interest!

@tumalopete It seems that the Dynamic Page is not defined correctly. You are using a Dynamic Category Page which is used to display multiple items. However, you are trying to display only one item. I think that what’s happening is that the dataset if empty when the page is ready.

You should check the docs for Adding and Setting Up a Dynamic Category Page and Adding and Setting Up a Dynamic Item Page .

You most likely need an index page instead of a Category Dynamic Page. See the article Creating an Index Page for Your Dynamic Pages .

@yisrael-wix Thanks very much. I will do as you suggest.