"My public site no longer works": What can happen if you delete records that are required fields in other records.
Volunteer Opportunities, Occurrences, locations and connections have lookup fields to other objects. And some of these lookup fields are required fields in another object.
So deleting a location may corrupt the record for a volunteer opportunity.
What happens if, for example, you delete a non-profit organization that is the managing organization for an active volunteer opportunity?
Answer: Bad things happen!
A volunteer opportunity has a number of required fields - including a default location where the opportunity takes place
This opportunity "Help find Missing People" has "Missing Persons HQ" as its default location. This location is also used in each of its occurrences.
The opportunity shows up on the calendar on the public site on the last Monday of every month
Watch what happens however, if someone deletes the location "Missing Persons HQ" from the database.
A 'helpful' staff person decided for some reason to delete this location as they heard it was closed down.
They did not however, go back to the occurrences that were using this location and put in another location. So now we have Occurrences that have no location! Hence, no zip code field is available to search.
When someone clicks on "Find an Opportunity" the default search looks for this occurrence, but can't render it because it is missing the zip code field required to display the search results!
Instead of the Search Results grid -- the volunteer sees this!!! Oh oh -- your public site is now broken.
When you see this "Authorization Required" screen on your public site -- it generally means required information in your data may be missing.
Often you may not know which record is missing, or which required field isn't populated.
You can run a report on required fields for Occurrences to troubleshoot, and repopulate the missing fields, and the site will return to normal.
In some cases, you may find the culprit record in the recycle bin. You can often recover it from there. (It may or may not restore the lookups in the parent records. So you may have to restore those manually).
MORAL: Don't delete records!
Best practice: Remove permission to delete records from all profiles except your system administrator profile.
See this post on how to update profiles for staff, partner staff, and volunteer leaders.