top of page

Wix 403 Forbidden Permission Error on Dynamic Pages

Updated: Sep 14, 2020




About 403 Error Pages

At the moment, there is no way to edit the 403 page design. This error appears when you do not have permission to access the content. How does a dynamic page know who has permission to access the content? Very simple --- in short, your dynamic page is created by the content from a database collection and the permissions are configured by you. You may have noticed that you or your audience may have SOMETIMES received a 403 permission error where:


  • Database permissions are set to Members Only

  • Database permissions are set to Member Author Only

  • Database permissions are set to Admin Only

  • Database permissions are set to Anyone but Page settings are set to Members or Admins Only

  • At least 1 reference field is linked to a Database with any of the permissions above

Is this a bug? Is this a flaw? Was it intentionally developed this way? Why does this only happen SOMETIMES? Keep reading to find out the different scenarios in which this error occurs.


 

Scenario #1

When you share a dynamic page with any of the permissions above


There are many reasons why someone would want to share a direct dynamic page URL, such as:


  • They want to share a property listing

  • They want to share a profile listing

  • They want to share a custom wishlist they created

  • They want to share a custom blog post

  • They want to share ..... well ..... anything they created or found


But why publicly share a dynamic page URL set to private permissions? To ensure users sign up as members before they read or access this information. (And many other smart reasons.)


And where or how would these links be shared? Anywhere and everywhere, such as:

  • Social Media

  • Email

  • Text

  • Newsletters

  • Internal links / pages

  • URL shortners for marketing & analytics purposes


When a person clicks on the link they are automatically redirected to the dynamic page, but IF that person is not logged into the website before they arrive on that dynamic page they will NOT be prompted to login. They will simply see the 403 error.


Why did Wix develop it this way? We don't know. All the other Wix apps and pages they developed work the opposite. What do we mean by this? When a user lands on a regular Wix page or a Members Area page set to ---- Members Only ---- they receive a prompt to login. Same thing for the Wix Forum members only categories, etc. No 403 error messages ever appear on these pages.

 

Scenario #2

When logging out of the website while still on a dynamic page with any of the permissions above

Regardless if a user logs out of the website by using a native Wix login bar or a custom logout button you have created, if they remain on the dynamic page they will also receive a 403 error message. It is important to know:


  • The dynamic page will not auto-redirect the user to another page

  • The native Wix login bar does not have an auto-redirect setting

  • A login window will NOT be prompted (as it does in other pages or Wix apps)


 

Solution offered by Wix

In short, Wix Support articles say to change the permissions of the database collection to avoid the 403 error message.



 

Code Queen Solution #1

Create a Router

The most popular workaround we have found is creating a regular page with either a login function OR a blank regular page set to members only (this way the login window is automatically prompted). Then you would create a beforeRouter() function in your backend for the database collection related to your dynamic page so that it redirects users to the 'new page'. Upon successful login, the user will be redirected back to the dynamic page.


Read more about the Router API here.


 

Code Queen Solution #2

Code all permissions


Manually add your own custom code to each of your dynamic pages to check if user is logged in to: prompt login, redirect user, etc. You can also get creative with the page content. For example, you can build your page on strips so that you can collapse or expand content upon login or logout. Another example would be to collapse only some strips, such as:

  • Expand only strips with 'some information'

  • Add a button to 'Log in to view more'

  • Expand other strips after successful login


We know these workarounds are not ideal and will add development time to your project, but these are the best known workarounds until Wix changes their 403 code logic.


This is not a 'new known error'. You can visit the official Wix Corvid Forum and look up '403' to find recurring posts as early as 2017 and 2018.

 

Author

by Code Queen


Stuck on a project? Need help on finding other workarounds? 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

507 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.

bottom of page