- 🇨🇭Switzerland florianmuellerch Aarau, Switzerland
As this affects core and I have the need to apply multiple patches, I created a patch for 10.x to apply.
- First commit to issue fork.
- last update
about 2 years ago 29,374 pass, 2 fail - @capysara opened merge request.
- 🇺🇸United States capysara
Re-rolled for 10.1.x. I based this MR on MR#3117 because the patch in the previous comment introduced some changes from the last version, most notably removing the constraints that were added in a previous commit. Maybe the patch was based on an earlier version?
I did not make any changes to the re-roll, so the updates noted in #85 ✨ Add a setting to make description a required field for file items Needs work still need to be implemented. I'm working on manually testing it.
- First commit to issue fork.
- last update
about 2 years ago 29,374 pass, 2 fail - last update
about 2 years ago 29,375 pass - 🇺🇸United States capysara
Manual testing (WIP)
I used the Live preview via Tugboat (TIL I learned there's a Live preview via Tugboat!)
- Create a file field (field_myfile1) in the Basic page content type admin/structure/types/manage/page/fields/add-field
- Check "Enable Description field"
- "Require the Description field" displays and is not enabled
- Uncheck "Enable..."
- "Require..." field is not displayed & Save
- Create a file field (field_myfile2)
- Enable Description but don't Require & Save
- Create a file field (field_myfile3)
- Enable Description and Require & Save
- Add Basic page node & Add files to fields
- Save without adding a description to the required field_myfile3
- Unable to save (fails both client- and server-side validation)
- Add a description to myfile3 and save
- Not good* Can't save because I didn't add a description to myfile1. When I added the field, I Enabled description, enabled Require, and then Disabled description, but didn't disable Require. Now it's expecting a value, but the Description field doesn't display.
- last update
about 2 years ago 29,375 pass - last update
almost 2 years ago 28,526 pass, 2 fail - @claudiucristea opened merge request.
- 🇬🇧United Kingdom malcomio
With the patch from #94 applied, we have observed PHP warnings, similar to 🐛 Undefined array key "description_field_required" in \Drupal\file\Plugin\Field\FieldWidget\FileWidget::formElement Needs work :
Undefined array key "description_field" in \Drupal\file\Plugin\Field\FieldWidget\FileWidget::formElement
- 🇮🇳India Vanitha Sophia
To address the Undefined array key "description_field" in \Drupal\file\Plugin\Field\FieldWidget\FileWidget::formElement for issue 104, we can use this patch
- Status changed to Needs review
over 1 year ago 9:25am 18 October 2023 - last update
over 1 year ago Patch Failed to Apply - Status changed to Needs work
over 1 year ago 1:50pm 18 October 2023 - 🇸🇰Slovakia poker10
@guardiola86 Thanks for your review and the status change, but this issue should be a Needs Work at the moment.
Which patch/MR have you reviewed? If the one from #105, this patch does not apply. The bigger issue is, that the content of that patch is significantly different from the MR 3915 and MR 4255 (see for example the default label "Require Description field"). Therefore I am not sure what was the starting point for this patch. Also the patch is missing interdiff, so we are unable to see what changes were made.
It is good to use MRs in case these are already created and not to upload new patches.
@Vanitha Sophia Thanks for working on this issue, but at the start I suggest to read this contributor guide: https://www.drupal.org/community/contributor-guide/task/create-a-patch-f... → before adding another patches here.
- Status changed to Needs review
over 1 year ago 2:18pm 19 December 2023 - Status changed to Needs work
over 1 year ago 8:55pm 19 December 2023 - 🇸🇰Slovakia poker10
There is a failure in the MR pipeline, which does not looks like a random one, but related to the MR changes:
There was 1 error: 1) Drupal\Tests\file\Functional\FileFieldDisplayTest::testDescToggle Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Save and continue" not found. /builds/issue/drupal-2320877/core/tests/Drupal/Tests/WebAssert.php:144 /builds/issue/drupal-2320877/core/tests/Drupal/Tests/UiHelperTrait.php:78 /builds/issue/drupal-2320877/core/modules/file/tests/src/Functional/FileFieldDisplayTest.php:178 /builds/issue/drupal-2320877/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
https://git.drupalcode.org/issue/drupal-2320877/-/jobs/507087
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-description-required-10.0.x to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-9.5 to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-10.1.x to hidden.
- Status changed to Needs review
10 months ago 9:15pm 1 July 2024 - 🇧🇷Brazil carolpettirossi Campinas - SP
I tested the patch provided on #115 on Drupal 10.3.0, and it worked as expected. See below the test steps I executed:
- Status changed to Needs work
10 months ago 9:17pm 4 July 2024 The Needs Review Queue Bot → tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
Manual testing has been performed in #100 ✨ Add a setting to make description a required field for file items Needs work
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-description-required to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 10.1.x to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-9.4.x to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-9.3.x to hidden.
- 🇷🇴Romania claudiu.cristea Arad 🇷🇴
claudiu.cristea → changed the visibility of the branch 2320877-10.4 to hidden.
- 🇺🇸United States charles belov San Francisco, CA, US
Alas, I could not apply the patch.
simplytest.me gives the following errors:
This may be the error:
[warning] Drush command terminated abnormally.
Command Failed (Tugboat Error 1064): Exit code: 1; Command: cd "${DOCROOT}" && ../vendor/bin/drush si standard --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat --account-name=admin --account-pass=admin -yDoing a file compare between a successful simplytest.me (Drupal core 11.x dev only) and my attempt to include this patch on Drupal core 11.x dev gave the following notable differences in the simplytest.me log, from the patch attempt:
09447f901e195c35cd0dee# /bin/sh -c composer global config --no-interaction allow-plugins.szeidler/composer-patches-cli true
Changed current directory to /root/.config/composer
6809447f901e195c35cd0dee# /bin/sh -c composer global config --no-interaction allow-plugins.cweagans/composer-patches true
Changed current directory to /root/.config/composer
6809447f901e195c35cd0dee# /bin/sh -c composer global require szeidler/composer-patches-cli:~1.0
Changed current directory to /root/.config/composer
./composer.json has been updated
Running composer update szeidler/composer-patches-cli
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking cweagans/composer-patches (1.7.3)
- Locking szeidler/composer-patches-cli (1.0.8)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Downloading cweagans/composer-patches (1.7.3)
- Downloading szeidler/composer-patches-cli (1.0.8)
0/2 [>---------------------------] 0%
1/2 [==============>-------------] 50%
2/2 [============================] 100%
- Installing cweagans/composer-patches (1.7.3): Extracting archive
- Installing szeidler/composer-patches-cli (1.0.8): Extracting archive
Generating autoload files
No security vulnerability advisories found.
6809447f901e195c35cd0dee# /bin/sh -c cd stm && composer patch-enable --file="patches.json"
The composer patches file was created.
The composer patches functionality was enabled successfully.
6809447f901e195c35cd0dee# /bin/sh -c cd stm && composer patch-add drupal/core "STM patch 5876.patch" "https://git.drupalcode.org/project/drupal/-/merge_requests/5876.patch" --no-update
Gathering patches from patch file.
The patch was successfully added.
6809447f901e195c35cd0dee# /bin/sh -c cd stm && composer update --no-ansi
Gathering patches from patch file.(later)
- Applying patches for drupal/core
https://git.drupalcode.org/project/drupal/-/merge_requests/5876.patch (STM patch 5876.patch)
Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/drupal/-/merge_requests/5876.patch(later)
Fatal error: Cannot use Drupal\Core\Config\Entity\ConfigEntityUpdater as ConfigEntityUpdater because the name is already in use in /var/lib/tugboat/stm/web/core/modules/file/file.post_update.php on line 12
[warning] Drush command terminated abnormally.
Command Failed (Tugboat Error 1064): Exit code: 1; Command: cd "${DOCROOT}" && ../vendor/bin/drush si standard --db-url=mysql://tugboat:tugboat@mysql:3306/tugboat --account-name=admin --account-pass=admin -y
6809447f539fecb43c9c5a94 (simplytest) is suspended - 🇺🇸United States charles belov San Francisco, CA, US
I thought that's what I did when I specified Drupal core 11.x and a patch of https://git.drupalcode.org/project/drupal/-/merge_requests/5876.patch
Is there some other URL I need to use to apply the patch?
- 🇩🇰Denmark ressa Copenhagen
@charles belov: I just tried with the patch and Drupal 11.x-dev which worked well, and I see the new "Require the Description field" option. Maybe simplytest.me was temporarily challenged?
- 🇺🇸United States charles belov San Francisco, CA, US
Interesting. 11.x-dev still fails for me but 11.1.x-dev works. Tested with 11.1.x-dev on simplytest.me.
Tested:
- description required and initially not entered, then enter when prompted
- description required and entered first time
- description optional and not entered
- description optional and entered
All work for me.