Database/tables not working/loading when published

Hi there,
Please can someone from Wix login to my account and help me?

I have two databases/tables but they have been ‘loading’ for a few days. Occasionally they may work for 30 seconds but then goes back to loading.

Please can someone help. Thank you very much.

The tables are on these pages:

You are getting an error message:
Wix code SDK error: The id parameter of item at index 2 is required for columns method.

The reason for this is an incorrect columns property for the Table. You had three columns (the third one was null which caused an error), and the dataPath parameters were incorrect. Not sure why you have this since it’s not really needed, but if you really insist, it should look something like this:

$w("#table1").columns = [{
 "id": "col1",
 "dataPath": "title",
 "label": "title",
 "width": 100,
 "visible": true,
 "type": "string",
 }, {
 "id": "col2",
 "dataPath": "newField11",
 "label": "Location",
 "width": 100,
 "visible": true,
 "type": "string",
 }];

You’ll also need to correct the columns parameters on the Course page.

I hope this helps.

Yisrael

HI Yisrael

Thank you so much for getting back to me. I have replaced it with your code but am still facing the same issues?

You edited your code incorrectly and now have an error:


You should restore to the previous code, and then make the correction again (without the error).

Please can you help me fix this error? thank you so much

import wixData from 'wix-data';

export function button1_click(event, $w) {
 //// Runs a query on the "Jobs" collection
wixData.query('Jobs') 
 // Query the collection for any items whose "Title" field contains  
 // the value the user entered in the input element
  .contains('title', $w('#input1').value)
  .find()  // Run the query
  .then(res => {   
 // Set the table data to be the results of the query     
    $w('#table1').rows = res.items; 
   });
}
   $w.onReady(function () {
    $w("#table1").columns = [{
 "id": "col1",
 "dataPath": "title",
 "label": "title",
 "width": 100,
 "visible": true,
 "type": "string",
        }, {
 "id": "col2",
 "dataPath": "newField11",
 "label": "Location",
 "width": 100,
 "visible": true,
 "type": "string",
        }];
   });


Thank you so much for your help. I am still having the same issue. I’m not sure what I am doing wrong?

I just tried it and it’s working fine:

Thank you. I have checked on a few different computers/browsers and can only see ‘loading’?

The table on the Job Board page works fine. I can’t fix what isn’t broken.