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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Waen created an issue. See original summary.

bkhandruk’s picture

Used bundle plugin ID in order to load entity.

Status: Needs review » Needs work
oeklesund’s picture

I 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 ;-)

APM1976’s picture

It works for me, too. Thank you...

zerolab’s picture

Status: Needs work » Needs review
Waen’s picture

Working for me too, thank you!

APM1976’s picture

Yes, 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.

zerolab’s picture

Status: Needs review » Needs work

Judging from the last comment, this needs further work

zerolab’s picture

Here's a fix tested with Media bundles and pathauto.

LiamWalsh’s picture

I've tried and tested zerolab's patch and works for me

  • OlgaRabodzei committed a89fe56 on 8.x-1.x authored by zerolab
    Issue #2839354 by zerolab, rocket.man, becassin, APM1976: Conditional...

Status: Needs review » Needs work
OlgaRabodzei’s picture

Status: Needs work » Fixed

Was fixed in the last release(2017-Apr-07). Can someone check it, please?

Status: Fixed » Closed (fixed)

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