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.
Recoverable fatal error: Object of class Drupal\media_entity\Plugin\MediaEntity\Type\Generic could not be converted to string in conditional_fields_load_dependencies() (line 259 of modules/conditional_fields/conditional_fields.module).
Steps to reproduce it:
Install Media_Entity
Go to the url /admin/structure/media/add to create a media bundle
Comments
Comment #2
bkhandruk CreditAttribution: bkhandruk commentedUsed bundle plugin ID in order to load entity.
Comment #4
oeklesund CreditAttribution: oeklesund commentedI observed the same issue on a later step (bundles were already created), going to url admin/structure/media/manage/BUNDLE_TYPE
The patch above partly solved the issue, but escapes notices on later code lines where the $bundle variable would be used.
More importantly, it broke the "normal" functionality (i.e. node/add/article).
Attached is a patch that works for me. Feedback welcome since this is my first patch ever ;-)
Comment #5
APM1976 CreditAttribution: APM1976 commentedIt works for me, too. Thank you...
Comment #6
zerolab CreditAttribution: zerolab at Torchbox for The Chartered Society of Physiotherapy commentedComment #7
Waen CreditAttribution: Waen commentedWorking for me too, thank you!
Comment #8
APM1976 CreditAttribution: APM1976 commentedYes, it's ok... but it has a strange influence on pathauto module. This patch does not allow to create a URL pattern. I do not know what relationship between them... So I'm just commenting on these lines of code to create a pattern.
keywords: conditional fields, media entity, pathauto.
Comment #9
zerolab CreditAttribution: zerolab at Torchbox for The Chartered Society of Physiotherapy commentedJudging from the last comment, this needs further work
Comment #10
zerolab CreditAttribution: zerolab at Torchbox for The Chartered Society of Physiotherapy commentedHere's a fix tested with Media bundles and pathauto.
Comment #11
LiamWalsh CreditAttribution: LiamWalsh at Access commentedI've tried and tested zerolab's patch and works for me
Comment #14
OlgaRabodzei CreditAttribution: OlgaRabodzei at Adyax commentedWas fixed in the last release(2017-Apr-07). Can someone check it, please?