I installed with composer and Enabled the Hide seconds radio button then updated and saved.
But seconds are still visible while adding article.
Using PHP 8.1 latest Drupal (10.0.4)
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | replace-deprecated-field-widget-hook-3347617-6.patch | 692 bytes | omkar-pd |
| Create Article.png | 5.22 KB | biarr | |
| Hide Seconds.png | 13.62 KB | biarr |
Issue fork datetimehideseconds-3347617
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
geek-merlinThanks for reporting this. Did you look for existing issues? DOes the patch in the related issue fix that?
Comment #3
biarr commentedDear geek-merlin, thank you for your prompt reply. I applied the mentioned patch but it didn't solve the problem.
Comment #4
geek-merlinOK so likely the upstream render array ran away and this needs debugging.
Comment #5
omkar-pd commentedInstalled the module on Drupal 10. Was able to reproduce the issue. It seems that value
$element['#datetimehideseconds']['hide']Is getting Null even if the hide seconds field is checked in the widget. So the code insideif (!empty($element['#datetimehideseconds']['hide']))is not excuted.Comment #6
omkar-pd commentedAfter some RnD. I found out that
hook_field_widget_form_alteris removed in Drupal 10. Check out the below link for change records.https://www.drupal.org/node/3180429
Comment #7
omkar-pd commentedComment #8
geek-merlinThis looks convincing! Does it fix the issue for you?
If you add a MR, it will be committed sooner ;-).
Comment #10
omkar-pd commentedYes @geek-merlin, it fixes the issue for me. Raised an MR.
Comment #12
geek-merlinOK committed this. Thanks a lot!
We really need a test so this won't break again. So if you know someone... ;-)
Comment #14
leducdubleuet commentedI know this has been committed already on dev for a while but we would need a new release please for Drupal 10 now that Drupal 9 is EOL.
Thank you!