We came across the below issue after a using uploaded some files to a SharePoint site. When navigating to the affected site users would receive the following error:
An error occurred during the processing of /site/SharedDocuments/Forms/AllItems.aspx. Code blocks are not allowed in this file.
The AllItems.aspx had become corrupt. To resolve this we replaced the Allitems.aspx file with one from a working site. To access the files, use the “Open with Explorer” option in SharePoint and navigate to the “Forms” folder.