Apply Changes fails with error "Details: undefined method `length' for an instance of ActionController::Parameters "
search cancel

Apply Changes fails with error "Details: undefined method `length' for an instance of ActionController::Parameters "

book

Article ID: 382438

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

The symptom observed on this issue are errors referencing a property not defined similar to the example below:

Cause

This issue can be caused by a property value from a staged product (tile) submitted via the API with an incorrect format. The bad value causes the property to error out as it can't be consumed.

Resolution

Workaround 
Revert back the changes by click on Revert back button top right beside Review Pending changes  

Resolution
To identify the property which causing this issue, use the API to query the properties of the existing staged products. This will allow to identify the product that persisted an incorrect value.

 

 

The product with the incorrect values will error out or return ActionController::Parameters somewhere in the response. Once the property with the incorrect value is identified the customer can modify it to the correct format.

Below is an example of how an invalid format can look:

## property value with incorrect format:
 .cloud_controller.encrypt_key:
   value:
     secret:
       secret: MYPASSWORD
 
 
 ## correct format for the property
 .cloud_controller.encrypt_key:
   value:
     secret: MYPASSWORD