Sections in the Article
This article explains how to avoid getting the error message An unexpected error occurred in Contribute and how to fix the problem if the message is shown.
With all the different configurations that are possible in Contribute, you sometimes make mistakes that trigger the An unexpected error occurred message. Below is an explanation of what might have caused an error.
Including a Channel but not Channel Content
In Contribute, you can include channels so that users can see which channels an entity is part of.
However, if you choose to not include any of the channel fieldTypes in Contribute, you'll get an Unexpected error message, as shown in the screenshot below.
This happens because you have set Contribute to show which channels an entity is part of, while at the same time restricting the channel content from being visible. This is shown in the screenshot below.
Including fieldTypes in Contribute
The solution to this issue is to include at least the ChannelName fieldType in Contribute, as explained below.
To Include a fieldType in Contribute
- In the Web Portal > Contribute (backend), select your Contribute environment from the dropdown.
- Go to Settings and filter > Include & Show and edit field types and check one or more boxes in the Field types dropdown, as indicated below.
- Go to Contribute (frontend) and click the Overview tab. No error message is shown, as indicated below.
If you don't want the Contribute users to be able to edit your channel, you can include the fieldTypes as read-only in your Contribute configuration. This will make the channel content visible while the users are restricted from changing anything on the channel itself.
To Make fieldTypes Read-Only in Contribute
- Go to the Web Portal > Contribute (backend) > Settings and filter.
- Enter the channel fieldTypes you want to include under Include & Show and edit field types' as well as under Read-only field types, as indicated below.