- Issue created by @tunic
- last update
over 1 year ago Custom Commands Failed - @tunic opened merge request.
- 🇪🇸Spain tunic Madrid
Please ignore the 10.1.x, I pushed there by mistake. The same fix is in the 3361695-fix-the-documentation branch.
- Status changed to Needs review
over 1 year ago 9:47am 21 May 2023 - 🇪🇸Spain tunic Madrid
Additionally, should the Form API or render system detect this problem and raise a waring? Some kind of render/form API array structure validation
- Status changed to Needs work
over 1 year ago 10:59am 22 May 2023 - 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
Creating list of files to check by comparing branch to 10.1.x /var/www/html/core/lib/Drupal/Core/Render/Element/Select.php:44:38 - Unknown word (overriden)
Should be
overridden
instead. - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 11:10am 22 May 2023 - 🇪🇸Spain tunic Madrid
Thanks for the review, typo fixed and branch rebased so it's mergeable again.
- Status changed to Needs work
over 1 year ago 4:00pm 22 May 2023 - 🇺🇸United States smustgrave
Seems there are out of scope indent changes happening.
- Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs review
over 1 year ago 7:30pm 22 May 2023 - 🇪🇸Spain tunic Madrid
Ouch! I'm trying a new IDE and I've discovered it is not configured for Drupal coding standards. Sorry for the noise.
- Status changed to RTBC
over 1 year ago 11:50pm 22 May 2023 - 🇺🇸United States smustgrave
Text appears to match the issue described in the issue summary and no issues in the tests.
LGTM.
- last update
over 1 year ago 29,396 pass - last update
over 1 year ago 29,399 pass 51:48 48:07 Running- last update
over 1 year ago 29,400 pass - Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs work
over 1 year ago 12:22pm 2 June 2023 - Status changed to Needs review
over 1 year ago 10:12am 16 July 2023 - 🇪🇸Spain tunic Madrid
#12, I think it is interesting to automatically check that the issue is not happening (aka #options value overriden by #empty_value if #empty_option is present in #options), but I'm not sure how to do it.
Using assert will only work when assertions are enabled. This can be the case for automatic testing but it is not on production environments. Given the dynamic nature of forms, it is possible that the case where #options is overriden only happens on certain situations. This would not be detected by testing. And having a fatal error can be too drastic, I guess.
I would check the condition and raise a warning. This way Drupal is able to continue running, even though there's probably a problem. Any devs checking the logs or debugging a weird behavior on a form will see error.
But this discussion can ne longer, and the initial issue is about documentation. I think we should focus this issue on the documentation and open a new one for the warning where we can discuss how to do it.
- Status changed to RTBC
over 1 year ago 2:36pm 17 July 2023 - last update
over 1 year ago 29,446 pass - 🇪🇸Spain tunic Madrid
Follow up added: 🐛 Add an exception/warning/assert/other when a #options value is overriden because #empty_options Needs work .
- last update
over 1 year ago 29,446 pass - last update
over 1 year ago 29,446 pass - last update
over 1 year ago 29,450 pass - last update
over 1 year ago 29,453 pass 51:19 47:59 Running- last update
over 1 year ago 29,455 pass - last update
over 1 year ago 29,456 pass - last update
over 1 year ago 29,457 pass - last update
over 1 year ago 29,458 pass - last update
over 1 year ago 29,458 pass - last update
over 1 year ago 29,459 pass - last update
over 1 year ago 29,459 pass - last update
over 1 year ago 29,465 pass - last update
over 1 year ago 29,465 pass - Status changed to Needs review
over 1 year ago 11:29am 15 August 2023 - 🇳🇿New Zealand quietone
I am doing triage on the core RTBC queue → .
The issue summary is short and clear. And looking at the MR it is fixing the problem stated there. I read the comments and see that a suggestion was moved to another issue. That looks like a good choice here.
On reading the MR I though the sentence could be improved and made a suggestion on the MR. Setting back to NR for that.
Then, I realized I should have read the code. It appears this is working as designed, therefor I am not convinced that the doc change should include 'Warning'. Right now I am thinking the sentence should begin with 'Note that' instead of 'Warning:'
- Status changed to Needs work
over 1 year ago 12:14am 16 August 2023 - last update
over 1 year ago 29,465 pass - Status changed to Needs review
over 1 year ago 12:08pm 17 August 2023 - 🇪🇸Spain tunic Madrid
#16, it may work as designed, but the behavior doesn't seem right, hence the warning. See https://www.drupal.org/project/documentation/issues/1936636#comment-1505... → for an example.
However, I think "Note"wold work. If it is preferred I won't complain, but I would like to have a decision soon so we can fix the MR with the agreed value.
- Status changed to RTBC
over 1 year ago 2:20pm 21 August 2023 - 🇺🇸United States smustgrave
Searching core found examples of using both Warning: and Note: so seems like a coin toss. Going to mark it though as the sentence has been updated.
- last update
over 1 year ago 29,469 pass - Status changed to Needs work
over 1 year ago 5:20pm 21 August 2023 - 🇫🇮Finland lauriii Finland
+1 that "note that" would read better here. It's definitely more in line with our pre-existing comments.
- last update
over 1 year ago 29,469 pass - Status changed to Needs review
over 1 year ago 6:24pm 21 August 2023 - Status changed to Needs work
over 1 year ago 6:25pm 21 August 2023 - last update
over 1 year ago Custom Commands Failed - Status changed to Needs review
over 1 year ago 6:28pm 21 August 2023 - 🇪🇸Spain tunic Madrid
Changed "Warning: " by "Note that" (with an intermediate commit where I wrongly used "Note: ")
- last update
over 1 year ago 29,469 pass - Status changed to RTBC
over 1 year ago 6:54pm 21 August 2023 - 🇺🇸United States smustgrave
Thanks for the quick fix. Going to go ahead and mark it as I doubt this will cause test failures.
- last update
over 1 year ago 29,469 pass - last update
over 1 year ago 29,469 pass - last update
over 1 year ago 29,469 pass - last update
over 1 year ago 29,470 pass - last update
over 1 year ago 29,470 pass - 🇳🇿New Zealand quietone
I'm triaging RTBC issues → . I read the IS and the comments since my last comment. I didn't find any unanswered questions or other work to do.
Leaving at RTBC.
- last update
over 1 year ago 29,470 pass - last update
over 1 year ago 29,471 pass 6:49 5:34 Running- last update
over 1 year ago 29,471 pass - last update
over 1 year ago 29,471 pass - last update
over 1 year ago 29,473 pass - last update
over 1 year ago 29,477 pass - last update
over 1 year ago 29,477 pass - last update
over 1 year ago 29,482 pass - last update
over 1 year ago 29,482 pass - last update
over 1 year ago 29,482 pass - last update
over 1 year ago 29,483 pass, 2 fail - last update
over 1 year ago 29,640 pass - last update
over 1 year ago 29,644 pass - last update
over 1 year ago 29,643 pass - Status changed to Needs review
over 1 year ago 9:29am 2 October 2023 - 🇫🇮Finland lauriii Finland
I've probably come to lurk on this issue more than 3 times by now and I've always gotten stuck at trying to remember what does it mean that the #empty_option overrides a value from the #options. I remember this made sense after stepping through this with a debugger but maybe we need to improve the docs so that that wouldn't be required? 😅
- 🇪🇸Spain tunic Madrid
@laurii I guess you mean more details in the sentence are required on the proposed sentence.
This is the current sentence:
Note that if #empty_value is the same as a key in #options then that value in #options is overridden with the value of #empty_option
Would it be clear with this?
Note that if #empty_value is the same as a key in #options then the value of #empty_option is used for that key in the #options array.
Also, I guess the status should be "Needs work" instead of "Needs review", right?
- Status changed to Needs work
over 1 year ago 1:34pm 2 October 2023