Skip to main content
OCLC Support

Index out of bounds error when working with controlled vocabulary

Symptom
  • You get the error "Index was outside the bounds of the array. (CONTENTdm Project Client)" when clicking inside a specific field that is set to use controlled vocabulary
Applies to
  • CONTENTdm
Resolution

This can happen if no data is in the first line of your controlled vocabulary list.  To view the current Controlled Vocabulary for a field go to the CONTENTdm Administration page then under the collections tab select the Field properties link.  Select the edit button on the right-hand side for the desired metadata field.  Click on the Administer controlled vocabulary link and select Browse at the bottom of the next screen to view the controlled vocabulary list.  If there are one or more blank lines at the start of the list then the controlled vocabulary will need to be edited.

Controlled Vocabulary lists are created by adding approved terms from the metadata field, and approved terms could potentially contain errant characters.  When these terms are approved it results in the blank lines at the start of the Controlled Vocabulary list.

An audit of the metadata field will be needed to confirm that no bad metadata or errant characters are still present in the current metadata.  This can be done by following the steps in the following documentation: I cannot remove incorrectly formatted terms from a controlled vocabulary list.

Page ID
36265