On a clean installation of Drupal 8.4.2 I see the following error when enabling the IU Paragraphs module:

RuntimeException: Unable to determine class for field type 'color_field_type' found in the 'field.storage.0' configuration in Drupal\field\FieldStorageConfigStorage->mapFromStorageRecords() (line 157 of /var/www/drupal8/web/core/modules/field/src/FieldStorageConfigStorage.php).

The color field module (and all of the other dependencies of IU Paragraphs) were already enabled before enabling this module.

Comments

vaccinemedia created an issue. See original summary.

jwilson3’s picture

Hi vaccinemedia,

Does the patch here help? #2854199: Color Boxes Widget default values don't work

vaccinemedia’s picture

I'm afraid not jwilson3. I have the following patches:

"patches": {
      "drupal/paragraphs": {
        "Add new hooks to allow easier editing of paragraph forms": "https://www.drupal.org/files/issues/2868155-16.patch"
      },
      "drupal/color_field": {
        "Color Boxes Widget default values doesn't works": "https://www.drupal.org/files/issues/color_field-2854199-7.patch"
      }
    }
jwilson3’s picture

Assigned: Unassigned » jwilson3

Ok thanks for checking that.

I've not had this problem on the site we're building. I'll need to start from scratch and try on a clean install myself to confirm.

vaccinemedia’s picture

StatusFileSize
new4.46 KB

OK thanks. For completeness her's the full composer.json

jwilson3’s picture

Running your composer.json uncovered a couple things, but mainly that you're using color_field 1.0.0, but the recommended install on the project page is now 8.x-2.0-rc2, and this module requires the 2.0 version at the lowest.

 - Installing drupal/color_field (1.0.0): Loading from cache
  - Applying patches for drupal/color_field
    https://www.drupal.org/files/issues/color_field-2854199-7.patch (Color Boxes Widget default values doesn't works)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/color_field-2854199-7.patch

What if you try the following:

composer require "drupal/color_field": "^2.0"

I'll update the documentation to state that color_field: 2.0 is required along with the patch above.

jwilson3’s picture

StatusFileSize
new1.12 KB

  • jwilson3 committed fcdddc5 on 8.x-1.x
    Issue #2928951 by jwilson3, vaccinemedia: Require patched Color Field 2....
jwilson3’s picture

Status: Active » Fixed

Marking this fixed. Please reopen if the above doesn't work. Thanks for the bug report!

I should also let you know that I'm probably going to remove the color_field module integration before a full release. This piece was part of proof of concept work that ended up not suiting the needs, because users shouldn't be allow to choose so many background colors for their sections.

According to the IU Style Guide users can only choose: no background, image background, gray background, or "secondary background" which will usually default to either brown (mahogany) or red (crimson). This needs a bit of a complicated refactor so I'm hesitating to make the change. When I do change this though, I will probably not create an upgrade path for you, because we're still too early in development.

Hope you do find this work useful.

Best,
James

jwilson3’s picture

Fwiw, I recommend you also run the following commands to reinstall both this module and the theme. I've just deployed a couple fixes to both that should make the installation run more smoothly.

composer update drupal/iu
composer update drupal/iu_paragraphs
jwilson3’s picture

Please note:

Because I've added some patches to the composer.json file in the IU Paragraphs module, if you do not remove these same patches from your composer.json file in your project root, you will get the following error:

https://github.com/cweagans/composer-patches/issues/123

jwilson3’s picture

Assigned: jwilson3 » Unassigned
jwilson3’s picture

vaccinemedia: I've just pushed the fix to completely remove the Color Field module dependency. This requires updating both IU_Paragraphs and IU Theme and manually removing the old Background Color field with machine name (iu_section_bgcolor) on the 'Section' Paragraph Type.

See: #2929965: Replace background color field with basic color selector

Status: Fixed » Closed (fixed)

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