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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | brightcove-3427776.patch | 841 bytes | abhishek_gupta1 |
| Screenshot 2024-03-14 105520.png | 11.27 KB | mehul_mobiiworld |
Comments
Comment #2
abhishek_gupta1 commentedComment #3
abhishek_gupta1 commented@mehul_mobiiworld , I have fixed the issue and created patch.
Comment #5
yce commentedThe 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.