I am trying to create Brightcove API client
The path "[site:url]/admin/config/media/brightcove_api_client/add"

On submit getting error:
"The website encountered an unexpected error. Try again later."

As I checked in recent log getting the following error:
TypeError: Drupal\brightcove\Entity\BrightcoveAPIClient::setMaxCustomFields(): Argument #1 ($max_custom_fields) must be of type int, null given, called in /var/www/html/docroot/modules/contrib/brightcove/src/Form/BrightcoveAPIClientForm.php on line 270 in Drupal\brightcove\Entity\BrightcoveAPIClient->setMaxCustomFields() (line 278 of /var/www/html/docroot/modules/contrib/brightcove/src/Entity/BrightcoveAPIClient.php).

Please check I am not able to create new API client

Comments

mehul_mobiiworld created an issue. See original summary.

abhishek_gupta1’s picture

Assigned: Unassigned » abhishek_gupta1
abhishek_gupta1’s picture

Assigned: abhishek_gupta1 » Unassigned
Status: Active » Needs review
StatusFileSize
new841 bytes

@mehul_mobiiworld , I have fixed the issue and created patch.

  • yce committed 25e6c80b on 3.2.x
    Issue #3427776: Getting unexpected error on creating Brightcove API...
yce’s picture

Status: Needs review » Fixed

The specification says it's a non-nullable string: https://apis.support.brightcove.com/cms/references/reference.html#tag/Cu...

However, the API responds with an integer and based on the error message it can be null.

I've pushed a simpler fix to dev, casting NULL to int results in a 0 value.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.