Field Visibility Based on Content Item Data

I am trying to hide/show input fields within a content type based on a dropdown field contained within the content type. I am selecting “All Properties” -> “Visibility…” -> “Conditional” -> Type = “Content Item Data” -> selected the field in the list and it is populated in the Value field = “Local/field_name”. After saving the new visibility rule I receive this error when accessing a content item using that content type:

An error occurred processing the query submitted by session id 1133a3b5a350273c6e264374d6dcf195d8261ab4. com.percussion.error.PSEvaluationException: An error occurred while making an internal request in the CMS layer to location: "An error occurred while making an internal request in the CMS layer to location: “psx_ceerauContact/erauContact”. The text of the exception is: An exception occurred while processing the internal request handler call: [1] null: No ManagedConnections available within configured blocking timeout ( 30000 [ms] ); - nested throwable: (javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 30000 [ms] )) ". The text of the exception is: {1} edit handler

I also tried calling the variable via a “Single HTML Parameter” but this doesn’t seem to work either, I don’t get an error but the rule is not enforced.

Stephen,

Is the error occurring when you create a new item, or when you view an existing item?

I have seen errors like this occur when using Content Item Data while creating a new Content Item. What essentially happens is the server keeps trying to load the (not-yet-existing) Content Item so it can process the rule, and eventually runs out of connections in the database pool.

If that’s your situation, try adding a Modify Only rule as the first rule in the set of Field Visibility rules, and use an AND operator to join with your other rule.

RLJII

Thanks Robert, the error was occuring on an existing content item and referencing a field that has been in the content type for quite a while. I will try your suggestion and also see what happens when creating a new item.

Stephen,

Just to rule out the obvious, in the Content Item you are testing, the field you are using has a value (in other words, is not null)?

RLJII

That is correct, the field does have a value. When I attempted to create a new item with this rule in place I received the following error:

com.percussion.error.PSEvaluationException: contentid may not be null

I also tried restarting the server, cloning the rule in the production environment, and adding the modify only rule to the field visibility rules but this did not change the outcome.