When entering the config_inspector form page (/admin/reports/config-inspector/.../form) I get this error:

Fatal error: Call to undefined method Drupal\Core\TypedData\Plugin\DataType\Boolean::getType() in .../modules/config_inspector/config_inspector.module on line 280

Am I missing something or is it broken?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Lol, we just found this same bug with @swentel as we are about to talk about config and would demo this in an hour or so :) Thankfully @swentel has a slightly older D8 copy, so that will work for the demo. Core dropped this I guess in http://drupalcode.org/project/drupal.git/commit/a18a231ea46c011369ca72a2... (#2056721: Remove TypedDataInterface::getType()). We should figure out how to do something useful without that.

juanolalla’s picture

Status: Active » Needs review
FileSize
468 bytes

I've tried to fix it.

Gábor Hojtsy’s picture

Status: Needs review » Active

Reopened the issue for change notice update at #2056721-45: Remove TypedDataInterface::getType(). I don't have a good idea as to how to proceed here ATM. I agree this is a critical bug report, almost nothing of the module works ATM.

Gábor Hojtsy’s picture

Wait, is that due to how the config schema provides this data anyway? :D That is not the only place we use getType() in the code though.

Gábor Hojtsy’s picture

All right, based on Berdir in #2056721: Remove TypedDataInterface::getType(), using definition's type is the best we can do for now. Can you fix in all occurrances? :)

Gábor Hojtsy’s picture

Status: Active » Needs review
juanolalla’s picture

Assigned: Unassigned » juanolalla

Of course, I'll do it at soon as my kid go to bed ;)

juanolalla’s picture

Replaced all occurrences of getType() for type element from getDefinition() array.

Gábor Hojtsy’s picture

Ok, this module does not have automated tests yet, so we need someone to manually try these out. Did you click through the different variants yourself?

juanolalla’s picture

Yes, I just clicked the four options of Config Inspector: List, Tree, Form, and Raw data for a couple of items and it seems to be ok.

Gábor Hojtsy’s picture

Status: Needs review » Fixed

Yay, thanks, committed, pushed!

Status: Fixed » Closed (fixed)

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