Hi, I am building a website on Wix with two dynamic pages. Page 1: https://www.thecaninecompany .in/recipes
This page links to a dataset and uses a repeater to show those items.
Page 2:
https://www.thecaninecompany .in/recipes/chocolate-chip-cookies
This page is loaded when an item is clicked on Page 1. I have used a prebuilt preset on Wix to create these two pages.
I am having couple of issues in building the page 2. I will write the problems here one by one.
When loading page 2, I see this error in the developer console:
Failed to perform query on [Recipes].
WDE0045: Invalid .gt parameter value [Undefined]. Valid .gt parameter types are String, Number or Date.
Any idea what is this?
Now on page 2, on load, the #radioGroup2 radio loads its items based on one of the column of the dataset. The column contains an array of values and I parse those array and store it in the radio button. I am currently using this code to do so:
export function loadWeight(){
let weight;
wixData.query("Recipes")
.eq("title", $w("#title").text)
.find()
.then( (results) => {
if(results.items.length > 0) {
let firstItem = results.items[0];
weight = firstItem['weight'];
$w('#radioGroup1').options = buildOptions(weight);
} else {
// handle case where no matching items found
console.log("Item Found", "Zero");
}
} )
.catch( (err) => {
let errorMsg = err;
console.log("Error", err);
} );
}
Here I am using $w(“#title”).text to query on the item being displayed. I am not sure how to get the name from the URL. Please help me understand this.
Also, during preview, the weights are loaded correctly. But when using the live web page, nothing happens. The weights are not being loaded.
Thank you for your support.