Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am not sure why, but the brightcove ID numbers are sometime interpereted as a FLOAT, which totally breaks the serialization and storage in the field_FIELD_NAME_data field.
This may be their fault (or the result of JSON weirdness) but I'm implementing a fix.
Comments
Comment #1
joshk CreditAttribution: joshk commentedIn order to keep this clean, I am now doing like:
And we are back to happy-land.
Comment #2
aaron CreditAttribution: aaron commented$id = (integer)$echove->createMedia('video', $filepath, $metaData);
is probably better. will commit that.Comment #3
aaron CreditAttribution: aaron commentedI've committed that to both branches now. Seems to work for me, although I hadn't noticed the behavior originally.
Comment #4
aaron CreditAttribution: aaron commentedso it's apparently interpreted as a float because it's such a huge number. thus typecasting it to an integer causes it to roll over... i'm going to typecast it to a string and see how that works.
Comment #5
aaron CreditAttribution: aaron commentedthat works. committed to both branches.