Form linked to dataset works in preview, not live

I’ve built two pages with forms linked to datasets in the site collection. Both work fine in preview - database updated in the sandbox - but throw the error message from the live version and does not update anything.

In preview there are no error messages in the Developer Console. Is it possible that these forms don’t work unless a user is physically signed into the site? Right now I only have a generic (PW only) entry point to a members’ page which contains links to the two form pages.

I’ve not seen any documentation which says this is required - I’ve followed the instructions in the resource page to the letter and am running out of ideas as to why this isn’t working properly.

Thanks,
Scott

Scott what is the url for the page you are having issues with?

The first page I created has code to initiate email responses via SendGrid (which it doesn’t likely because it’s tied to the database posting event) is https://uniconational.wixsite.com/unico/district-governor-s-quarterly-repor

The second (simpler) page (no additional developer code on the page) is https://uniconational.wixsite.com/unico/unico-national-monthly-chapter-repo

Thanks for any and all suggestions, Steve.

@smiller Hey Scott. So your instinct is correct. When you are in the Editor building out your site you are essentially logged in as the Admin. So any testing you do in preview mode is done as a logged in user with the Admin role.

When you publish your site the default state is ‘logged out’ so the role will be ‘Visitor’ until the visitor logs in. In that case they will be, at a minimum, ‘Member’ or ‘Admin’ . There are other roles you can use but this is the simple explanation.

OK so having looked at your sites we can see this error pop up in the developer console of the browser of the published site. Indeed the Error message on your published site says something similar.


If you go into the Data Collections that you are trying to save to and check permissions…


You will see these settings for the ChapterReport Data Collection:

Note the only people who can create or change (edit/delete) content is someone logged in with Admin privileges.

So you need to determine who is allowed to change your site content and set the privileges accordingly.

I would always leave the delete option as an Admin task for safety purposes.

Now if you look at the DGReport Data Collection you will see the same problem

Here again the permissions are limited to an Admin.

Lastly, I also noticed that you have a minor issue with one of you input fields:

Basically you have a couple of fields that you say are optional on the input form →

One of which is not optional :-). So you may want to revisit the settings and make the necessary correction!

Hope you find this helpful. For more information and other help check out these articles:

Cheers!

Steve

@stevendc thanks very much! I’ll make the necessary changes and retest.

@stevendc Steve,

Database posting is working properly now - very grateful for your assistance.

I have one more question - how do you bring up the developer’s console on the published site? Didn’t see any documentation on that.

Hi Scott
Well the answer is you don’t :-).

When you are working on a live published site you need to debug using the browser developer tools. So this will be dependent upon the browser you use (Safari, Chrome, Firefox etc.).

The best starting point is learn the tools of the browser. At a minimum you will be able to see the console log.

I am considering hosting a Wix Code debugging webinar. Let me know if that is something you would like!

Steve

Gotcha - I’m familiar with the Chrome console but haven’t used it much. I will eagerly look forward to you webinar. Thanks again!