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

  • Inside of the editor via the site structure panel

  • Via the Wix Dashboard




But the sync buttons will only appear from 2 locations:

  • Inside of the editor via the site structure panel

  • Inside of the editor via the menu panel

Click on the 'Sync to Sandbox' button if you want to SEND a copy of your Live database into the Sandbox database.


Click on the 'Sync Sandbox to Live' button if you want to SEND a copy of your Sandbox database into your Live database.


It is important to make sure you have published the latest version of your Sandbox database before trying to sync, otherwise the data will not not be saved into the correct fields / columns. Why? Because the column has to exist in the Live database first before you can send / sync / add information into that specific field / column. So if you do not publish first, you will not be able to sync your data correctly.


It is also important to understand that you do NOT have to add data into both databases in order for data to appear on your published website. It is only required to have data in your Live database collection.


Old editor version

You may be looking for the old way of syncing data, but that no longer exists. Wix has updated and re-updated the editor multiple times over. For the sake of reminiscing, here is what the editor used to look like for syncing data:




Why is it missed and why is it better? Let us count the ways:

  • There was never any windows in the way of hitting the 'Publish' button to publish the site before syncing.

  • Re-ordering columns was fast and simple

  • Everything was compact and easy to access



Good to Know #5

Dataset Mode Settings

There are multiple ways to connect data to elements on the page. One way is by using a dataset. If you are unable to see any data on your live database and you have already tried all of the above tips, then perhaps your dataset mode is configured incorrectly.


A regular dataset and dynamic dataset can be configured according to your needs, page logic and user logic. The 3 types of dataset modes are:

  • Ready Only

  • Write Only

  • Read & Write


Read Only mode is used when you want to display data that does not need to be modified. Think of this as 'outgoing information'. Write Only mode is used when you are using the dataset only to collect new data that will be saved into a database collection. Think of this as 'incoming information'.


Read & Write mode is the one that is most often used incorrectly. Yes, this mode allows a person to view and edit information from the database but it will not work if the information does not exist before the dataset is loaded. For example:

  • You have a profile form that is set to read and write

  • Your intention is to allow new and existing users fill out and edit this profile form


Well the above won't happen because a 'new user' won't have an existing profile to edit in the first place, therefore the 'new user' will either see 'nothing' or will see the 'wrong profile'.


Author

by Code Queen


Stuck on a project? Hire Code Queen, LLC!

Schedule a phone call or video call directly online. In a different time zone? No problem! Code Queen currently has clients around the world.


Online Booking: Discovery Session

Contact Form: Send project details

89 views0 comments

disclaimer

a quick note about our website content

Our free and premium content is non-exclusive, meaning you are not the only one with access to the content. You can customize our content to fit your end product. Redistribution of our content is strictly prohibited. This means you cannot make our content available to others as-is, stand-alone products or stock products in ANY LANGUAGE, regardless if you offer our content for free or not.

  • Code Queen Facebook Group Icon
  • Facebook Logo
  • Twitter Logo
  • YouTube logo
  • Instagram Logo
  • Linkedin Logo

© 2021.  All Rights Reserved by Code Queen, LLC.