everything works in preview mode but not in published site

so i implemented the code exactly as i was shown in the forum and it works everything works BUT only in preview. it does not work in the published site… my search code that used to be working does not work in the published site… !!!

Thanks in advance for the help!:slight_smile:

1 Like

Hi,

Please provide us with the site URL and screenshots of the issue so that we can check it on our end.

Thanks,
Tal.

the search code does not work

Hi,

I noticed that the mode of the dataset is Read&Write . Please change it to Read Only . Click here to learn more about Working with Dataset Modes and Collection Permissions . Moreover, please make sure that you’ve synced the data to the live site.

Have a good day,
Tal.

1 Like

Hi Tal,

Thank you so much for the feedback! after i made changes to the dataset and checked that all my items where synced to live site it still does not work… is there anything else im missing?

Hi,
I checked your permissions and noticed that

I checked your console error and saw the following message:
Uncaught (in promise) Error: The current user does not have permissions to read on the staff collection.


Note that only a site member can view the collection’s information:

If you wish that all site visitors can view the info, you should change the first dropdown from “Site member” to “Anyone”.

Good luck,
Tal.

Hi Tal,

THANK YOU SO MUCH! its working now all is good! thank you! :slight_smile:
by any chance do you know how to solve this too?

Hi Good Day, I have the same problem, everything works in preview mode but not in published site. Here is the URL → https://evanrjenkins.wixsite.com/dogservice, scroll down to see the form.

Hey geovelx ,

In order to check what is the issue, I recommend the following:

  1. Making sure that you’ve synced that data to the live site.
  2. Changing the dataset mode to " Read Only "
  3. Checking the collection permissions .

Should the issue persists, please send us the page name and screenshots of the issue.

Tal.

EDIT - It’s working. All data was going into live dataset, not sandbox.

I am having this issue as well on heatherwood

Data input through preview loads to database fine. When it’s submitted from live site, it says successfully submitted but never shows up in database.

I did have database permissions set to members only, since this is in a members section. I tried changing to anyone to see if that fixed it, and it hasn’t.

Any other suggestions?

Hello, I am having same issue, I have wix code setup to email on submission, the email sends in preview mode but not on published site. I have DB set to read only and permissions set to anyone. Please help.
//email on submission

import {sendEmail, sendEmailWithRecipient} from ‘backend/email’;

$w.onReady(function () {
$w(“#dataset1”).onAfterSave(sendFormData);
});

function sendFormData() {
const subject = Thank you for registering with GameChangerz University;
const body = https://drive.google.com/open?id=1KpushXasCuZCCYRyCayFqK0tgi4NqVyd ;
const recipient = $w(“#input9”).value;

sendEmailWithRecipient(subject, body, recipient)
.then(response => console.log(response));

sendEmail(subject, body)
.then(response => console.log(response));
}

Hi, my site has issues on preview mode. After laying the widgets on the editor, only a single strip appears on the preview. My site url is https://simonwambua433.wixsite.com/apraorg

Hi, please I also have the same issue with repeater not showing in live site and I have done all these but it’s not working:

In order to check what is the issue, I recommend the following:

  1. Making sure that you’ve synced that data to the live site.
  2. Changing the dataset mode to " Read Only "
  3. Checking the collection permissions .
    my site url is https://elliosedgeservice.wixsite.com/mysite

HI,i know it has been a while,did you found any solution?I am having the same issue

Hello,
My ‘preview’ turns my input box and submit button grey, so no way to test it. What is wrong with my settings? thanks.

I am having the same issue. All of the sudden one of my pages is not connecting to the database. I have tried the following and nothing is working.

  1. Making sure that you’ve synced that data to the live site.
  2. Changing the dataset mode to " Read Only "
  3. Checking the collection permissions .
    My site is charlottehayniehealth.com and the page is the Recipes page.

I have a similar issue. I updated my website, saved and published. In preview mode looks corrected and updated. However in published mode I still have previous information. Any help?

Dear Sir. I am having the same problem sir. I have done everything possible as you suggested above. Please advise. The site is www.mathsacad99.com

Hi, I have a similar issue, I checked the below setting

  1. Synced data to the live site.
  2. Dataset mode to " Read Only "
  3. collection permission is " Form Submission"
    my site url is https://sujite2e.wixsite.com/performance-review
    need your assistance.

Hi Tal

Need urgent Help
Hi, I have the same issue that Form is working fine in Preview mode but not in Publish
I checked the below setting

  1. Synced data to the live site.
  2. Dataset mode to " Read Only "
  3. collection permission is " Form Submission"
    my site url is https://sujite2e.wixsite.com/performance-review
    need your assistance quickly