Drupal 10 compatibility fixes

Created on 18 July 2022, over 2 years ago
Updated 20 March 2024, 8 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects

Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.

The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue .

📌 Task
Status

Fixed

Version

2.0

Component

Code

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • 🇧🇾Belarus f1mishutka Minsk

    Created merge request with all changes from ProjectUpdateBot and D10 support added to .info files

  • Status changed to RTBC over 1 year ago
  • 🇮🇳India Vishal Choudhary Dharmshala

    I have created a patch to move the Form Mode Manager Module Drupal 9 to Drupal 10 With the help of Drupal Check Command(like, vendor/mglaman/drupal-check/drupal-check /modules/contrib/form_mode_manager

  • Status changed to Needs work over 1 year ago
  • 🇮🇳India prashant.c Dharamshala

    There are syntax errors, please check here
    https://www.drupal.org/pift-ci-job/2622023

    PHP Parse error:  syntax error, unexpected '|', expecting variable (T_VARIABLE) in /var/www/html/modules/contrib/form_mode_manager/src/Form/FormModeManagerDisplayEditForm.php on line 61
    xargs: php: exited with status 255; aborting
  • 🇮🇳India Vishal Choudhary Dharmshala

    Syntax Error fixed.

  • 🇺🇸United States xpersonas

    I would love to see this module be compatible with D10. I can confirm the patches are working for me on my D10 sites. I wish I was better educated at fixing tests. That's one area I still struggle with.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    31 pass
  • Status changed to RTBC over 1 year ago
  • 🇮🇳India rahul1707

    I have tested MR !8 in Drupal 10.0.8 and Drupal 9.5.7, functionality is working fine for me and upgrade status is showing D10 compatible.

    Moving this to RTBC.

  • 🇧🇪Belgium weseze

    When can we expect this committed and released? This is one of the final blockers for us to migrate 100+ sites from D9 to D10...

  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States dww

    I've been super slammed with too many things, sorry. ;) I'm hoping to make some time for (hopefully easy) D10 releases for more of my contrib projects next week.

    Looks like step 0 is untangling the mess of MR vs. patch contributions in here. Just from reading the issue, looks like the MR is where the real code is, and the patches are duplicate effort. It's not clear why #8-#10 were necessary, given that there was already an MR open...

    Meanwhile, wish there were testbot results from the MR branch.

    Anyway, I can't deal with any of this right now. Hopefully next week... 🤞

    Thanks!
    -Derek

  • 🇺🇸United States verres

    Also hoping for a d10 version -- this looks like exactly what I need. Hoping someone has time to merge to even a 'working' version with bugs...

  • 🇧🇪Belgium weseze

    @dww: I see a merge request with passing test and confirmation from @rahul17 this is working. What can we (I) do to help get this released?

  • 🇨🇦Canada avo webworks Ottawa, Ontario, Canada

    Would love to see the release as this is also for us the last remaining issue before we can upgrade to Drupal 10. Anything we can do to help?

  • 🇯🇵Japan eleonel Itoshima 🇯🇵

    I fixed multiple compatibility errors and now the module is working fine for me on my Drupal 10 site.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Composer require failure
  • 🇯🇵Japan eleonel Itoshima 🇯🇵

    Patch for the branch 8.x-2.x.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Composer require failure
  • 🇮🇳India abhisekmazumdar India

    The patch #20 makes the module installable in Drupal's latest version 10.
    Thank you @eleonel for the updated patch.

  • Status changed to RTBC about 1 year ago
  • 🇺🇸United States jedgar1mx Detroit

    Great! Very exited to get a new release for Drupal 10

  • 🇮🇳India ajeet_kumar gurugaon

    Patch #20 reviewed and testing working and installed with Drupal 10 latest version.

  • 🇺🇸United States jedgar1mx Detroit

    I still can't stall it without the new release since composer keeps saying is not compatible. I'm curious how others were to install it on Drupal 10 sites.

  • 🇧🇾Belarus f1mishutka Minsk

    I still can't install it without the new release since composer keeps saying is not compatible. I'm curious how others were able to install it on Drupal 10 sites.

    We successfully use this module under Drupal 10 since February'23.

    We use approach described in this article https://www.computerminds.co.uk/articles/apply-drupal-9-compatibility-pa... with this merge request https://git.drupalcode.org/project/form_mode_manager/-/merge_requests/8

    But for sure normal release for D10 will be much more convenient for everybody.

  • 🇭🇺Hungary pasqualle 🇭🇺 Budapest

    Just use https://github.com/mglaman/composer-drupal-lenient composer plugin to install any Drupal 9 module under Drupal 10. Then use https://github.com/cweagans/composer-patches to install the necessary patch or MR.

    Both plugins are on packagist, so they can be installed with a simple composer require command.

  • 🇨🇿Czech Republic David Urban

    Hi guys, I understand there is a workaround, but it is not a very comfortable one. Would it be possible to please release D10 compatible version so we can take advantage of composer automation? If there is anything low-code drupalist can do, please let me know! From the comments here is seems, nothing is standing in the way :).

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States dww

    Sorry for the delays, everyone. I've been way too busy for my own good. 😬

    I did some light local testing, and it appears that all the automated tests still pass against Drupal core 8.9. So there's no reason for this:

    - core_version_requirement: ^8 || ^9
    + core_version_requirement: ^9 || ^10
    

    Instead, we want this:

    core_version_requirement: ^8 || ^9 || ^10

    However, the D10 port doesn't actually seem to be working. 😢 When I run the full form_mode_manager test suite locally against a 10.1.x core dev site, all the Kernel tests are fine, but the Functional tests fail thusly:

    PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
    
    Testing /.../form_mode_manager/tests/src/Functional
    ........E......E.                                                 17 / 17 (100%)
    
    Time: 04:43.567, Memory: 10.00 MB
    
    There were 2 errors:
    
    1) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFieldFormFormModeManager with data set #2 (array('blocks', 'blockType', 'blockFormMode'), 'block/add/@type', 'block/@id', 'info[0][value]')
    Behat\Mink\Exception\ExpectationException: Current response status code is 404, but 200 expected.
    
    /.../drupal-10/vendor/behat/mink/src/WebAssert.php:794
    /.../drupal-10/vendor/behat/mink/src/WebAssert.php:130
    /.../form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:166
    /.../drupal-10/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    2) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFormModeManagerUserOverview
    RuntimeException: Adding non-existent permissions to a role is not allowed. The incorrect permissions are "use user.vrcdolbY form mode".
    
    /.../drupal-10/core/modules/user/src/Entity/Role.php:207
    /.../drupal-10/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:321
    /.../drupal-10/core/modules/user/src/Entity/Role.php:179
    /.../drupal-10/core/lib/Drupal/Core/Entity/EntityStorageBase.php:528
    /.../drupal-10/core/lib/Drupal/Core/Entity/EntityStorageBase.php:483
    /.../drupal-10/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:257
    /.../core/lib/Drupal/Core/Entity/EntityBase.php:339
    /.../drupal-10/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:609
    /.../form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:335
    /.../drupal-10/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    
    ERRORS!
    Tests: 17, Assertions: 622, Errors: 2.
    

    Could be a bug in the module, or a bug in the test. But I *definitely* don't have time today/this week to investigate further. Someone else needs to run with this problem if they're interested in a D10 release anytime soon.

    Alas,
    -Derek

  • First commit to issue fork.
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    FYI bartik is missing in D10 (replaced by olivero) See https://www.drupal.org/node/3223395#s-recommendations-for-deprecated-themes
    Block admin paths are changing in D11 See https://www.drupal.org/node/3320855

    Form Mode Manager examples and some tests depend on `bartik`.

    My MR removes bartik from the info file, (I don't think theme is a valid key anyway)
    My MR replaces all instances of bartik with olivero (could also do stark, but I think the theme switching tests will be affected.)

    Long story short, I don't think tests will pass on D8 with these changes (unless we add the contrib module to composer dev dependencies)

    Then next change definitely will break Drupal 8/9 tests. Could consider a route based approach.

    Also getting these deprecation warnings (so I changed the admin path in the tests)

      22x: The path /admin/structure/block/block-content/types is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use /admin/structure/block-content. See https://www.drupal.org/node/3320855.
        8x in FormModeManagerUiTest::testFieldFormFormModeManager from Drupal\Tests\form_mode_manager\Functional
        2x in FormModeManagerUiTest::testEntityFormModeManagerSettingsUi from Drupal\Tests\form_mode_manager\Functional
        2x in FormModeManagerUiTest::testEntityFormModeManagerExcludeMalFormedEntities from Drupal\Tests\form_mode_manager\Functional
        2x in FormModeManagerUiTest::testEntityFormModeManagerLinksUi from Drupal\Tests\form_mode_manager\Functional
        2x in FormModeManagerUiTest::testFormModeManagerNodeOverview from Drupal\Tests\form_mode_manager\Functional
        ...
    

    I have two MRs
    1. Update code for Drupal 10.1 PHPCS
    2. PHPUnit fixes for D10.1

    I used this lando file to run tests after cloning the repo, in case anyone else would like an easy way to develop locally.

    name: form_mode_manager
    recipe: drupal10
    config:
      php: '8.1'
      via: apache:2.4
      webroot: web
      database: mariadb:10.4
      xdebug: false
    services:
      # Replaces default lando MariaDB image with arm64 (Apple M1) compatible one.
      # TODO: remove database service overrides once lando is updated.
      database:
        type: compose
        services:
          image: mariadb:10.4
          command: docker-entrypoint.sh mariadbd
          restart: always
          ports:
            - '3306'
          environment:
            MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: 'true'
            MARIADB_DATABASE: drupal10
            MYSQL_DATABASE: drupal10
            MARIADB_USER: drupal10
            MARIADB_PASSWORD: drupal10
      appserver:
        overrides:
          volumes:
            # Don't share our host working directory as /app. We want /app empty for composer.
            - /app
            # Instead share our host working directory as a standalone package.
            - .:/usr/local/form_mode_manager
        build:
          # Create a new Drupal project and use the module as a non-packagist repository.
          - composer create-project --dev drupal/recommended-project:10.1.x /app
          - composer config extra.enable-patching true
          - composer config extra.composer-exit-on-patch-failure true
          - composer config allow-plugins.cweagans/composer-patches true
          - composer require cweagans/composer-patches
          - composer config minimum-stability dev
          - composer config allow-plugins.phpstan/extension-installer true
          - composer require --dev drupal/core-dev:^10.1 drush/drush phpspec/prophecy-phpunit:* phpstan/extension-installer mglaman/phpstan-drupal phpstan/phpstan-deprecation-rules
          - composer config repositories.localdev path /usr/local/form_mode_manager && composer require drupal/form_mode_manager:\*@dev
    tooling:
      # Provide a command to install Drupal.
      install:
        service: appserver
        cmd:
          - /app/vendor/bin/drush --root=/app/web site:install --account-mail=noreply@example.com --account-name=admin --account-pass=admin --db-url=mysql://drupal10:drupal10@database:3306/drupal10 -y --verbose
          - /app/vendor/bin/drush en -y form_mode_manager
      # Provide Drush tooling to automatically know the Drupal root.
      drush:
        service: appserver
        cmd: /app/vendor/bin/drush --root=/app/web
      phpcs:
        service: appserver
        cmd: /app/vendor/bin/phpcs -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/form_mode_manager
      # Provide PHPCBF tooling to fix coding standards.
      phpcbf:
        service: appserver
        cmd: /app/vendor/bin/phpcbf -s --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/form_mode_manager
      # Provide phpstan tooling to check for code quality and deprecated code.
      phpstan:
        service: appserver
        cmd: /app/vendor/bin/phpstan analyse --configuration web/modules/contrib/form_mode_manager/phpstan.neon web/modules/contrib/form_mode_manager
      # Provide phpunit tooling to run unit tests.
      phpunit:
        service: appserver
        cmd: /app/vendor/bin/phpunit --configuration /app/web/core/phpunit.xml.dist --bootstrap /app/web/core/tests/bootstrap.php /app/web/modules/contrib/form_mode_manager
    
    
  • 🇺🇸United States dww

    Strong preference for testing with stark whenever possible

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    PHPLint Failed
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    20 pass, 2 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Seems like automated tests work on D10.1. See my comments here: https://www.drupal.org/project/form_mode_manager/issues/3399177#comment-... 📌 Transition releases from 8.x-* to semantic versioning Active

    Starting manual testing on Drupal 10.1
    Adding the following to composer.json:

      "repositories": [
        {
          "type": "vcs",
          "url": "https://git.drupalcode.org/issue/form_mode_manager-3297262.git"
        },
    

    and running

    composer require drupal/form_mode_manager:dev-3297262-automated-drupal-10
    
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Getting error when going to content after enabling the module

    Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'edit-form.supersede_datasheet' found for the 'node' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 196 of core/lib/Drupal/Core/Entity/EntityBase.php).
    
    Drupal\form_mode_manager\EntityTypeInfo->entityOperation(Object) (Line: 38)
    form_mode_manager_entity_operation(Object)
    call_user_func_array(Object, Array) (Line: 409)
    Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'form_mode_manager') (Line: 388)
    
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇦🇺Australia elc

    Changes to paths related to blocks were the only things causing errors; functionality is otherwise working in both versions of core.

    Block management pages have new paths and menu items
    @see https://www.drupal.org/node/3320855

    Compensated for by using different paths based on Drupal core version running the tests.

    Leaving at NW due to the toUrl() issue.
    Drupal\Core\Entity\Exception\UndefinedLinkTemplateException

  • 🇦🇺Australia elc

    @VladimirAus,

    I have been unable to replicate your toUrl error, however a number of other modules are getting hit by it. It really should have hit in the D8 -> D9 change instead of heading into D10.

    Any issues talking about it either try to move away from toUrl, or not assume that the template exists and catch the exception. The exception was added back in 8.0.0, but the guard on throwing it was removed sometime in 9. It used to return a blank string.

    Attached is a patch catch the exception and see if it solves your immediate problem, but also allows the module to continue working correctly.

    I don't know the circumstances in which EntityTypeInfo::entityOperation() gets entity form modes, presumably setup by this module, which then can't be resolved as a link when it shouldn't have been called only when it was possible.

    This should probably be made a child issue if it persists.

  • Status changed to Needs review about 1 year ago
  • 🇦🇺Australia elc

    Otherwise, this is ready to go.

    The bartik is done away by removing the additional module requirement and just using stark. Could not find an actual use of the bartik theme to test something.

    Tests were failing due to the block path changes which was relatively easy to mitigate although I did have to run phpunit locally to get anywhere with debugging tests.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    Changing this back to needs work, please apply the code suggestions that you agree with, and delete the ones you don't like.

  • 🇦🇺Australia elc

    Catching the UndefinedLinkTemplateException around toUrl() should be included regardless as this module should not be crashing a site when something as simple as a link is missing.

    Ty @trackleft2, that's a lot of changes! I'll keep my commits out of the way so avoid merge issues and have a look when I get back to this again.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.0 & MySQL 5.7
    last update about 1 year ago
    Composer require failure
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    31 pass
  • Status changed to Needs review about 1 year ago
  • 🇦🇺Australia elc

    Thank you @trackleft2

    I seem to have broken my ability to resolve any of these threads as the page crashed on me when I batched all of the changes together, as only about 1/3 ended up posted to d.o. All should be good for D10 again.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Status changed to Needs work about 1 year ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Great progress! Thanks for new commits! 🍰
    "Content" no longer crashes however when I go to edit node and click on form view mode different from Default I'm getting

    The website encountered an unexpected error. Please try again later.
    
    Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "node" entity type did not specify a "fmm_edit_supersede_datasheet" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 207 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    Drupal\form_mode_manager\AbstractEntityFormModesFactory->getForm(Object, 'fmm_edit_supersede_datasheet') (Line: 216)
    Drupal\form_mode_manager\AbstractEntityFormModesFactory->entityEdit(Object) (Line: 206)
    Drupal\form_mode_manager\Controller\FormModeManagerEntityController->getEntityControllerResponse('entityEdit', Object) (Line: 170)
    Drupal\form_mode_manager\Controller\FormModeManagerEntityController->entityEdit(Object)
    call_user_func_array(Array, Array) (Line: 123)
    
  • 🇺🇸United States dww

    This needs a rebase now that 📌 Remove t() calls in tests not testing translation Fixed and 📌 Fix the issues reported by PHP_CodeSniffer Needs work are in the 8.x-2.x branch.

    In the future, please do not scope creep issues by "fixing" unrelated changes. Makes everything harder. The diff should be as small as possible to address the title of the issue. In this case, we should only see changes that make the module compatible with D10.

    While rebasing, feel free to completely remove bogus commits to "fix" other things that aren't required for D10 compatibility, to avoid more merge conflicts, etc. We don't need to preserve that history (and it'll be buried in GitLab if we really need it for some reason).

    Thanks!
    -Derek

    p.s. Saving credit for ELC + trackleft2 for working on this, and VladimirAus for reviews.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇺🇸United States dww

    Rebased and force pushed. Still NW for at least #42.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇺🇸United States dww

    Re-iterating as a regular d.o comment, too:

    In the future, if we're trying to revert changes, just revert them. 😅 We don't need dozens of MR review threads with suggestions like this. Better to rebase and remove the offending commits...

    Mostly resolved all the open threads on the MR. I'm way out of time on this project for today, but at least we're closer...

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇦🇺Australia elc

    Let's move the issue #35/#42 into a child issue as it does not manifest in a clean install.

    Having looked at the code, it seems there is a form mode in @VladimirAus 's site for which Form Mode Manager module is not providing its services. How that comes to be is the question, and how should this module deal with and detect such a circumstance. Crashing the site is hardly the correct method. The catch on the exception is just a band-aid which kicked the can down the road, although it is a necessary guard for modules now.

    @VladimirAus - Could you please continue on working with 🐛 Exceptions and errors on D10 site for specific form mode: supersede_datasheet Active to figure out what is happen.

  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States dww

    Okay, that sounds good. Thanks for opening 🐛 Exceptions and errors on D10 site for specific form mode: supersede_datasheet Active and trying to debug that!

    Moving back to NR.

  • 🇺🇸United States dww

    Happy to report that running all the tests locally on a 10.1.x core dev site and they're now all passing. 🎉

    Anyone else up for any last manual testing so I can merge this and cut another release? Almost there...

    Thanks!
    -Derek

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Can do. Thank you both! 🍰

  • Status changed to RTBC about 1 year ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Just tested the bug above and after recents commits it is working.
    Good to go!

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Managed to edit and save it this time. 👍

  • 🇩🇪Germany Tomefa Dresden

    Patch is not applying anymore on dev branch.

    Probably because of latest merge on dev.

  • 🇫🇷France Papa Ours Paris

    Hello,

    Is it possible to have a patch including all your work and working with current last version 8.x-2.0-rc4 ?

    I was using https://git.drupalcode.org/project/form_mode_manager/-/merge_requests/8.patch last week and it was working nice but no more now.

    Thanks.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    @Papa Ours, this is something you can do via the GitLab UI , (I uploaded the updated patch here for you this time).

    I've been manually testing this in Drupal 10.0.11, and see that getActiveThemeOptions Doesn't actually work (doesn't load active theme options), not sure if this is a regression, or existing bug.

  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    Adding screenshot of bug

  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    Currently looks like this

    Should be like this:

  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    I really don't want to stand in the way of this getting, merged, but the READMEs (plural) are now incorrect.
    See: https://git.drupalcode.org/project/form_mode_manager/-/blob/8.x-2.x/READ...

    Update requirement to Drupal 8.8 and later as stated in the info file.

    See: https://git.drupalcode.org/project/form_mode_manager/-/blob/8.x-2.x/modu...

    Update requirements to include both, drupal:path and drupal:menu_ui or update the info file for form_mode_manager_examples to include them since config this module installs depends on those modules. Or move optional config to /config/optional.

    See: https://git.drupalcode.org/project/form_mode_manager/-/blob/8.x-2.x/modu...

    Additionally, we need to update the composer.json's require section to

    "drupal/core": ">=8.8"

    See migrate_tools composer.json as an example: https://git.drupalcode.org/project/migrate_tools/-/blob/6.0.x/composer.j...

  • 🇦🇺Australia elc

    drupal/core requirements in composer.json are automatically handled - there's no need to include them manually. They are built off the contents of the core_version_requirement key. Can be confirmed by looking in the composer.lock file after installing a module. I think it's done by one of the drupal composer plugins included in drupal/core-recommended ?

    Include the README changes in the patch. It's a D10 compat issue.

    The example module seems to need:

    • path
    • text
    • image
    • node
    • user
    • file
    • menu_ui

    These are needed for the module to install its config correctly. Is this a D10 issue though? Or should it be its own issue.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Assigned to elc
  • Status changed to Needs work about 1 year ago
  • 🇦🇺Australia elc

    The issue with #3297262-55: Drupal 10 compatibility fixes is actually long standing since D8.7.0 when system.theme.data was removed and replaced with the ExtensionList services (Module & Theme).

    There should also be a test to ensure that this continues to work as in D11 it has the potential to change again, with either an Interface added or some other changes.
    @see #2940481: Road to stabilize ExtensionList services

    Setting back to NW while I look at adding that test.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    32 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇦🇺Australia elc

    Removed testing I added because the issue with theme switcher is addressed in 🐛 Form Mode Theme Switcher invalid argument error Needs review and @trackleft2 wrote much better tests there. It should be merged in along with this for release.

    The change in 3103069 goes back to listing of themes which changed in drupal/core:8.7.0.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    31 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Patch Failed to Apply
  • 🇧🇪Belgium weseze

    Having trouble applying the diff from the merge request via composer.json, so I have attched a patch file that does work for me.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Patch Failed to Apply
  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    Here is the patch you want. Applies cleanly to 8.x-2.x (dev-2.x)

  • It looks like #62 has a few more changes than #61, both are applying cleanly to 2.0.0-rc4 for me though I chose #62 since it seems more up-to-date with the merge request at quick glance. Thanks!

  • 🇭🇷Croatia odisei

    Follow for D10 version

  • 🇺🇸United States caspervoogt

    #62 worked fine for me

  • 🇺🇸United States xpersonas

    I'm struggling to install this on a new D10 site. I managed to updated a site from D9 to D10 with patches. But seem to be struggling on a new install.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 11 months ago
    31 pass
  • Status changed to RTBC 11 months ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia
  • Pipeline finished with Success
    11 months ago
    Total: 382s
    #61051
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Looks good.
    CI passes.

  • heddn Nicaragua

    Using the MR on a D10 site right now. RTBC++

  • 🇩🇪Germany osopolar 🇩🇪 GER 🌐

    Worked for me too by adding the issue fork to the composer.json repositories:

    "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                    "drupal/form_mode_manager"
                ]
            },
            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/form_mode_manager-3297262.git"
            },

    and requiring the latest commit from PR via:

    composer require "drupal/form_mode_manager:dev-3297262-automated-drupal-10#2c564b3b047dfc5002349c45ef6eec9aa98f8968"

  • 🇨🇦Canada adriancid Montreal, Canada

    I tried to merge but phpunit test failed. Is late here so I will try to check in the next days, if somebody can take a look it will help, I hope I will be able to merge this soon and release a new version.

  • Status changed to Needs work 9 months ago
  • 🇨🇦Canada adriancid Montreal, Canada

    Putting this back to "Needs work" as the. test are not passing.

  • 🇺🇸United States trackleft2 Tucson, AZ 🇺🇸

    Here are the PHPUnit Errors

    There were 7 errors:
    1) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFieldFormFormModeManager with data set #0 (array('users', null, 'userFormMode'), 'admin/@type/create', 'user/@id/edit', 'timezone')
    TypeError: substr(): Argument #1 ($string) must be of type string, Drupal\Component\Render\FormattableMarkup given
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:289
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:229
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:168
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    2) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFieldFormFormModeManager with data set #1 (array('nodes', 'nodeTypeFmm1', 'nodeFormMode'), 'node/add/@type', 'node/@id/edit', 'body[0][value]')
    TypeError: substr(): Argument #1 ($string) must be of type string, Drupal\Component\Render\FormattableMarkup given
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:289
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:229
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:168
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    3) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFieldFormFormModeManager with data set #2 (array('blocks', 'blockType', 'blockFormMode'), 'block/add/@type', 'admin/content/block/@id', 'info[0][value]')
    TypeError: substr(): Argument #1 ($string) must be of type string, Drupal\Component\Render\FormattableMarkup given
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:289
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:229
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:168
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    4) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFieldFormFormModeManager with data set #3 (array('terms', 'vocabulary', 'taxonomyFormMode'), 'admin/structure/taxonomy/mana...pe/add', 'taxonomy/term/@id/edit', 'description[0][value]')
    TypeError: substr(): Argument #1 ($string) must be of type string, Drupal\Component\Render\FormattableMarkup given
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:289
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/UiHelperTrait.php:229
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:168
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    5) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFormModeManagerNodeOverview
    Behat\Mink\Exception\ExpectationException: Link with label Add content as kpi30oz4 not found.
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:575
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:301
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:314
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    6) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFormModeManagerUserOverview
    Behat\Mink\Exception\ExpectationException: Link with label Add user as a4bllvm6 not found.
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:575
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:301
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:363
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    7) Drupal\Tests\form_mode_manager\Functional\FormModeManagerUiTest::testFormModeManagerTaxonomyTermOverview
    Behat\Mink\Exception\ExpectationException: Link with label Add term as p0iv2grm not found.
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:575
    /builds/project/form_mode_manager/web/core/tests/Drupal/Tests/WebAssert.php:301
    /builds/project/form_mode_manager/tests/src/Functional/FormModeManagerUiTest.php:390
    /builds/project/form_mode_manager/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
    ERRORS!

  • Assigned to scott_euser
  • 🇬🇧United Kingdom scott_euser

    Looking at this now; hiding patches in favour of MR

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 8 months ago
    31 pass
  • Pipeline finished with Failed
    8 months ago
    Total: 312s
    #112621
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 8 months ago
    31 pass
  • Pipeline finished with Failed
    8 months ago
    Total: 382s
    #112655
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 8 months ago
    31 pass
  • Pipeline finished with Success
    8 months ago
    Total: 364s
    #112679
  • Issue was unassigned.
  • Status changed to Needs review 8 months ago
  • 🇬🇧United Kingdom scott_euser

    Okay tests are now passing. I created a follow-up 📌 Phpstan + Cspell + Drupal 11 compatibility fixes RTBC to update phpstan/cspell/drupal 11 deprecation - let's not let that halt progress on getting this in. Hopefully @adriancid you can take it from here as a maintainer? Let me know if there is anything further I can do to help get this in.

  • Status changed to Fixed 8 months ago
  • 🇨🇦Canada adriancid Montreal, Canada
  • 🇬🇧United Kingdom scott_euser

    Awesome thank you! Much appreciated

  • 🇨🇦Canada adriancid Montreal, Canada

    Thanks to all the contributors.

    The release is ready: https://www.drupal.org/project/form_mode_manager/releases/3.0.0

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

Production build 0.71.5 2024