- Issue created by @project update bot
This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → these changes make this module compatible with Drupal 11! 🎉
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug info
Bot run #11-121090This patch was created using these packages:
- drupal/upgrade_status: 4.1.0
- mglaman/phpstan-drupal: 1.2.7
- palantirnet/drupal-rector: 0.20.1
- Status changed to Needs review
about 1 year ago 1:15pm 17 March 2024 - Status changed to RTBC
4 months ago 1:47pm 12 December 2024 - 🇨🇦Canada mparker17 UTC-4
+1 to RTBC.
I have code-reviewed and manually tested the code in merge request !11, and I'm satisfied with it.
Here's what I did to manually-test !11:
- Install ddev (I tested on version 1.24.1)
- Clone the module, issue fork, and branch:
git clone --branch '1.x' https://git.drupalcode.org/project/field_protect.git && cd field_protect
- clone the projectgit remote add field_protect-3430524 https://git.drupalcode.org/issue/field_protect-3430524.git && git fetch field_protect-3430524
- add a remote for the issue forkgit checkout -b 'project-update-bot-only' --track field_protect-3430524/'project-update-bot-only'
- switch to the branch for merge request !11
- Set up a test site for the module with the ddev/ddev-drupal-contrib plugin:
ddev config --project-type=drupal --docroot=web --php-version=8.3 --corepack-enable --project-name=field-protect
- create a ddev project for testing the moduleddev add-on get ddev/ddev-drupal-contrib && ddev start && ddev poser && ddev symlink-project
- run the setup steps for the ddev/ddev-drupal-contrib addon- Go to
https://field-protect.ddev.site/core/install.php
in a browser. Confirm that I saw the Drupal 11.0.9 installer. Install the site with the "Standard" install profile. - Go to
/admin/people/create
and create a user with the Content editor role. I gave mine the usernametest_editor
.
- Set up the module for testing:
- Go to
/admin/modules
and install field_protect and its dependencies - Go to
/admin/people/permissions
, grant the Content editor role the following permissions:- Field Protect -> Remember field unlock
... click Save permissions.
- Go to
/admin/structure/types/manage/page/form-display
. Click the gear in to the Title row. Check Field Protect: Protect from accidental changes.. In Field Protect: Message, enterChanging the title may result in the URL alias changing!
, then click Update. You see the warning message You have unsaved changes.. Click Save. You see the status message Your settings have been saved. The Title row now shows Field protected against accidental changes 🔒 and, indented, Changing the title may result in the URL alias changing!.
- Go to
- Test the module's basic functionality:
- Log out of the administrator account and log in as the
test_editor
user you created earlier. - Go to
/node/add/page
. Set Title =Lorem
and Body =Ipsum
. Click Save. You see the status message Basic page Lorem has been created. - Click Edit in the primary tabs. You see an Edit Basic page Lorem form. The Title field is greyed out with a Unlock field link.
- Click the Unlock field link. You see a modal that looks like:
Please confirm before you continue
This field is locked
You can edit this field, but you need to understand the implications. This field is protected with the following message:Changing the title may result in the URL alias changing!
Are you sure you want to proceed?
... you see Cancel and Unlock buttons.
- Click the Cancel button in the modal. The modal disappears, and the field remains locked.
- Click the Unlock field link. You see the same modal from earlier.
- Click the Unlock button in the modal. The title field is now editable again. Set Title =
Dolor
. Click Save. You see the status message Basic page Dolor has been updated.
- Log out of the administrator account and log in as the
This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.
It is important that any automated tests available are run and that you manually test the changes.
Drupal 11 Compatibility
According to the Upgrade Status module → these changes make this module compatible with Drupal 11! 🎉
Therefore these changes update theinfo.yml
file for Drupal 11 compatibility.Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.
Debug information
Bot run #11-392907These packages were used to generate the fixes:
- drupal/upgrade_status: 4.3.6
- mglaman/phpstan-drupal: 1.3.2
- palantirnet/drupal-rector: 0.20.3