Data visible in Preview but data not visible on published website

Updated: Sep 14, 2020


Common scenarios

While there may be a lot of different scenarios that may cause problems when viewing data on a published website, we have compiled a list of the most common 'mistakes' or 'overlooked steps' that people often make.

Good to Know #1

Database Permissions


Make sure your permissions for adding, viewing, editing and deleting are set correctly on  your database collection.  It used to be a bit easier to find the 'permissions' settings, but the Wix editor has changed quit a bit since Wix code was first released.



Now to view or change the permissions you use the site structure panel:

  • hover over the database collection you want to edit or check

  • click on the setting icon that appears after hovering

  • click on 'edit settings'


You can also use the content manager panel found within the editor menu icons:

  • hover over the database collection you want to edit or check

  • click on the three dots that appear after hovering

  • click on 'edit settings'



After you click on 'edit settings' you will see an 'edit content collection'. It may not be clear, but the permissions settings are located under the title 'What's this collection for?".



The default permission is usually 'Site Content'. This means an Admin can save data into a database, Anyone can view data, Admin can edit the data and Admin can delete the data.


If your settings are set to 'Members' only, then only persons that are logged into your site can view that data. This means if you are currently NOT logged in on your live site while attempting to view data from that specific database collection then:

  • Either your permissions are incorrect for that database

  • Or your page permissions are incorrect so that the public does not land on this page


If your settings are set to 'Private Data', then only an Admin that is logged in on your site can view that data. This means, if you or and Admin are on your live site while attempting to view the data from that specific database collection:

  • Either your permissions are incorrect for that database

  • Or you forgot to include the correct page permissions to prompt login



If your settings are set to 'Custom Use', then depending who you selected under 'who can read' will be the users that can view the data. This means:

  • Either your permissions are incorrect for that database

  • Or you forgot to include the correct page permissions to prompt login


If you forgot to prompt login, make sure:

  • To either manually add code to your page

  • Or select the 'Members Only' permission via the page settings


 

Good to Know #2

Reference field Permissions

We don't know if we should categorize this as a 'bug', a 'flaw' or if it was intentionally developed this way. This is one very ODD yet uncommon mistake that may have you scratching your head for a long time.

If you happen to have any reference fields in your database collection then make sure to check the permissions for the database collection where the reference field is connected to:


For example, let's say you have:

  • 1 database collection called Purchase with 'Public' permissions

  • 1 database collection called Coupon with 'Admin only' or 'Member only' permissions

  • 1 reference field in 'Purchase' database collection linked to 'Coupon' collection

Even though you have no restrictions and your permission are set to 'Public' on the 'Purchase' collection you will most likely have problems viewing data on the live website if you are not an Admin or a Member that is signed in. Why? Because that 1 reference field is connected to a database collection with private permissions. For whatever reason, this will cause the entire connection to the public database collection to experience 'errors' in visibility on the live website. If you have more than 1 reference field, then make sure you analyze all permission settings to each corresponding database collection.


Does Wix know? Yes, they should know because we already provided that feedback to them some time back.


[Last updated on July 12, 2020]


 

Good to Know #3

Publish Your Site

If you have published your site only 1 time, then chances are you forgot to add data into the Live database after publishing. See 'Good to Know #4' below to learn about sending a copy of data from the Sandbox to the Live database collection after you publish your site for the first time.

If you have made changes to your database collection, such as:

  • add new Fields / Columns

  • add new entries within the Sandbox

  • import new entries into the Sandbox

Then make sure you have published your site in order to see the new fields on your Live database, and to have the ability to send (or sync) data from the Sandbox to the Live database collection.

 

Good to Know #4

Database Syncing


Sometimes data will not appear on your live published website if the database collection is empty.


There are currently 2 'places' to insert or add data to a database collection. The first place is the Live Database and the second place is called the Sandbox. They both appear in the same content manager window. You just have to make sure you switch to the correct mode so you know which collection you are editing.


If you accidentally enter the data in the Sandbox and forget to sync (or 'send-the-data-to-the-live-database') then no data will appear on the live published website.



You can open the content manager window from 3 different locations:

  • Inside of the editor via the menu panel