‘An unexpected error has occurred’ when cancelling from creating a new page [SharePoint]

On SharePoint 2013 we had an issue where the user was getting the error message below when cancelling from creating a new page in the Pages library.

Sorry, something went wrong

An unexpected error has occurred.

The correlation ID for this error will be an empty GUID (000000-000-etc).

The steps to reproduce this issue are as follow:

  1. Navigate to the Pages library
  2. Navigate to a particular view of the Pages library
  3. From the ribbon choose to create a new page of any content type
  4. On the Create Page, choose Cancel

It turns out that this problem is caused by a space in the file name of the view chosen in step 2 above.

In our case the file name of the view was “Fact Sheets.aspx”. This means that when we go to the view in step 2, the URL is encoded as “…/pages/forms/fact%20sheets.aspx”.

When we go to the Create Page in step 3, this URL is again encoded and passed on in the Source query string parameter as “…/pages/forms/fact%2520sheets%2Easpx”.

When we click Cancel in step 4, SharePoint takes us back to the URL found in the Source query string parameter. It seems however that SharePoint is not decoding this value. It therefore takes us to the page “…/pages/forms/fact%2520sheets%2Easpx”, which does not exist and therefore results in the error.

Renaming the file name of the view to “FactSheets.aspx” fixed the issue.

This issue was found on December 2014 CU.


About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in SharePoint. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s