@C. S. Comfort

Account created on 3 August 2016, almost 8 years ago
#

Recent comments

I was able to reproduce this on a fresh install of Drupal 10.1.2 and verified that the issue occurs regardless of admin theme (Claro, Seven). I'm going to open a new but report over on the Paragraphs module, but for reference here are the steps I took to reproduce:

  1. Install Drupal 10.1.2, Drush, Paragraphs (contrib module), Seven (contrib theme) with Composer.
  2. Enable Media Library, Paragraphs, Seven modules.
  3. Create new Paragraph Type (PT), "Featured Image".
  4. To the Featured Image PT, add Media reference field with "Image" as the available media type.
  5. Create new PT, "Featured Video".
  6. To the Featured Video PT, add Text field, "Video URL".
  7. On the Basic page content type, add Paragraph reference field, "Featured Media" and enable Featured Image, Featured Video PTs.
  8. Create new Basic page.
  9. Click Add Featured Image.
  10. Note the "Insert Selected" button has correct styling.
  11. On the Basic page content type form display, disable the Body field.
  12. Create new Basic page.
  13. Click Add Featured Image.
  14. Note the "Insert Selected" button does not have correct styling.
  15. Switch the admin theme to Seven and observe that the issue persists.

Note that I'm on PHP 8.1 in a local DDEV environment.

@kiwimind I'm encountering the same issue on Drupal 10.1.1 and 10.1.2. Did you find a resolution?

Oddly, for me, the issue only occurs on some of my paragraphs that use the Media library -- and it appears to be content-type specific. I have two content types with Paragraphs using the Media library that render the button normally, and another two content types where the issue is the same as you presented initially.

On the paragraphs where the button renders correctly, the related classes are handled in the following order of precedence:

.button--primary
.button
.ui-widget
.ui-button

On the paragraphs where the button doesn't render correctly, this is the order:

.ui-widget
.ui-button
.button--primary
.button

Furthermore, a couple of other observations as I comment here:

  • I just tested and found similar results using the contrib Seven admin theme -- so it doesn't look to be specific to Claro.
  • Rearranging the order of the fields on the content type's form display resolves the issue (in my case having a rich text field directly above the paragraph entity reference field results in the button rendering properly).

I'll have to do some more testing as well...

@salmonek -- fantastic, looking forward to testing it out soon. Cheers!

@dolszewski -- excellent news, thanks for the update. Very much looking forward to the enhancement. Cheers!

In my testing, the patch does not allow for me to upgrade from Drupal 9.5.9 to Drupal 10.0.9 with Views Contextual Range Filter (1.0.0) installed. Here are the steps I just tried on a local environment running PHP 8.1:

1. Create a fresh Drupal 9.5.9 project: composer create-project drupal/recommended-project:9.5.9
2. Require drupal/contextual_range_filter
3. Require cweagans/composer-patches and enable patching.
4. Apply the patch.
5. Follow instructions to upgrade to Drupal 10 with Composer.

If I remove drupal/contextual_range_filter from composer.json and then re-run composer update -W, Drupal 10 installs successfully.

composer.json

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal 9 projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^1.9",
        "cweagans/composer-patches": "~1.0",
        "drupal/contextual_range_filter": "^1.0",
        "drupal/core-composer-scaffold": "^10",
        "drupal/core-project-message": "^10",
        "drupal/core-recommended": "^10"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "dealerdirect/phpcodesniffer-composer-installer": true
        },
        "sort-packages": true
    },
    "extra": {
        "enable-patching": true,
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        },
        "patches": {
            "drupal/contextual_range_filter": {
                "Rectorizes Drupal 10 compatibility": "https://www.drupal.org/files/issues/2022-07-18/contextual_range_filter.1.x-dev.rector.patch"
            }
        }
    }
}

Output from failed update

❯ composer require 'drupal/core-recommended:^10' 'drupal/core-composer-scaffold:^10' 'drupal/core-project-message:^10' --update-with-dependencies --no-update
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated

Desktop/test/drupal9 via 🐘 v8.1.19
❯ composer update -W
Gathering patches for root package.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - zendframework/zend-feed 2.12.0 requires php ^5.6 || ^7.0 -> your php version (8.1.19) does not satisfy that requirement.
    - laminas/laminas-feed[2.12.0, ..., 2.12.3] require php ^5.6 || ^7.0 -> your php version (8.1.19) does not satisfy that requirement.
    - symfony-cmf/routing[1.4.0, ..., 1.4.1] require php ^5.3.9|^7.0 -> your php version (8.1.19) does not satisfy that requirement.
    - laminas/laminas-feed[2.13.0, ..., 2.14.1] require php ^7.3 || ~8.0.0 -> your php version (8.1.19) does not satisfy that requirement.
    - drupal/core[8.9.11, ..., 8.9.20] require php ^7.0.8 -> your php version (8.1.19) does not satisfy that requirement.
    - drupal/core[9.0.10, ..., 9.0.14] require php ^7.3 -> your php version (8.1.19) does not satisfy that requirement.
    - Root composer.json requires drupal/contextual_range_filter ^1.0 -> satisfiable by drupal/contextual_range_filter[1.0.0].
    - Conclusion: don't install drupal/core 9.5.2 (conflict analysis result)
    - drupal/core-recommended 10.0.2 requires drupal/core 10.0.2 -> satisfiable by drupal/core[10.0.2].
    - Conclusion: don't install drupal/core 10.0.2 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.3 (conflict analysis result)
    - drupal/core-recommended 10.0.3 requires drupal/core 10.0.3 -> satisfiable by drupal/core[10.0.3].
    - Conclusion: don't install drupal/core 10.0.3 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.4 (conflict analysis result)
    - drupal/core-recommended 10.0.4 requires drupal/core 10.0.4 -> satisfiable by drupal/core[10.0.4].
    - Conclusion: don't install drupal/core 10.0.4 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.5 (conflict analysis result)
    - drupal/core-recommended 10.0.5 requires drupal/core 10.0.5 -> satisfiable by drupal/core[10.0.5].
    - Conclusion: don't install drupal/core 10.0.5 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.6 (conflict analysis result)
    - drupal/core-recommended 10.0.6 requires drupal/core 10.0.6 -> satisfiable by drupal/core[10.0.6].
    - Conclusion: don't install drupal/core 10.0.6 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.7 (conflict analysis result)
    - drupal/core-recommended 10.0.7 requires drupal/core 10.0.7 -> satisfiable by drupal/core[10.0.7].
    - Conclusion: don't install drupal/core 10.0.7 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.8 (conflict analysis result)
    - drupal/core-recommended 10.0.8 requires drupal/core 10.0.8 -> satisfiable by drupal/core[10.0.8].
    - Conclusion: don't install drupal/core 10.0.8 (conflict analysis result)
    - Conclusion: don't install drupal/core 9.5.9 (conflict analysis result)
    - drupal/core-recommended 10.0.9 requires drupal/core 10.0.9 -> satisfiable by drupal/core[10.0.9].
    - Conclusion: don't install drupal/core 10.0.9 (conflict analysis result)
    - drupal/core[8.4.0, ..., 8.9.10] require symfony-cmf/routing ^1.4 -> satisfiable by symfony-cmf/routing[1.4.0, 1.4.1].
    - drupal/core[8.2.0, ..., 8.3.9] require symfony-cmf/routing ~1.4 -> satisfiable by symfony-cmf/routing[1.4.0, 1.4.1].
    - drupal/core[8.8.0, ..., 8.8.12] require zendframework/zend-feed ^2.12 -> satisfiable by laminas/laminas-feed[2.12.0, ..., 2.14.1], zendframework/zend-feed[2.12.0].
    - drupal/core-recommended 10.0.1 requires drupal/core 10.0.1 -> satisfiable by drupal/core[10.0.1].
    - Conclusion: don't install drupal/core 10.0.1 (conflict analysis result)
    - drupal/contextual_range_filter 1.0.0 requires drupal/core ^8 || ^9 -> satisfiable by drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.9].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.0.0, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.1.2, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.1.8, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9].
    - You can only install one version of a package, so only one of these can be installed: drupal/core[8.7.0, ..., 8.9.20, 9.0.0, ..., 9.5.9, 10.0.0, ..., 10.0.9].
    - drupal/core-recommended 10.0.0 requires drupal/core 10.0.0 -> satisfiable by drupal/core[10.0.0].
    - Root composer.json requires drupal/core-recommended ^10 -> satisfiable by drupal/core-recommended[10.0.0, ..., 10.0.9].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

@cmlara -- indeed, an oversight on my part. Thanks for the thoughtful reply. Cheers.

I resolved this issue by moving the config in question from config/install to config/optional.

Production build 0.69.0 2024