No Code Attached Yet bug
avatar brianteeman
brianteeman
27 Jul 2023

Steps to reproduce the issue

with the Blogposting schema use the date picker to add a date for published and modified date

Expected result

date selected

Actual result

Deprecated: Function strftime() is deprecated in libraries\src\Form\Field\CalendarField.php on line 322

image

System information (as much as possible)

php 8.1.10

Additional comments

also tested with #41260 but no change

avatar brianteeman brianteeman - open - 27 Jul 2023
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 27 Jul 2023
avatar korenevskiy
korenevskiy - comment - 27 Jul 2023

It looks like we created a request at the same time, you created an ISSUE, I created a PR. I haven't seen your ISSUE. ?

avatar richard67 richard67 - close - 27 Jul 2023
avatar richard67
richard67 - comment - 27 Jul 2023

Closing as having a pull request. Please test #41266 . Thanks in advance.

avatar richard67 richard67 - change - 27 Jul 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-07-27 14:25:02
Closed_By richard67
avatar brianteeman
brianteeman - comment - 27 Jul 2023

Please re-open - that PR doesnt work

avatar richard67 richard67 - change - 27 Jul 2023
Status Closed New
Closed_Date 2023-07-27 14:25:02
Closed_By richard67
avatar richard67 richard67 - reopen - 27 Jul 2023
avatar joomdonation
joomdonation - comment - 27 Jul 2023

I don't understand how this feature works yet. However, to prevent this deprecated warnings, we should add missing filterformat="Y-m-d" after this line https://github.com/joomla/joomla-cms/blob/5.0-dev/plugins/schemaorg/blogposting/forms/schemaorg.xml#L156

We should search for all calendar fields under plugins/schemaorg folder and add the missing filterformat definition.

avatar brianteeman brianteeman - change - 22 Aug 2023
Labels Added: bug
avatar brianteeman brianteeman - labeled - 22 Aug 2023
avatar joomdonation joomdonation - change - 26 Aug 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-08-26 09:27:52
Closed_By joomdonation
avatar joomdonation joomdonation - close - 26 Aug 2023
avatar joomdonation
joomdonation - comment - 26 Aug 2023

Wouldn't it be better to just fix it here: https://github.com/joomla/joomla-cms/blob/4.3-dev/libraries/src/Form/Field/CalendarField.php#L322C36-L322C36 ?

Unfortunately, there is no reliable solution, see #41266 for an example attempt. The easiest solution would be adding translateformat="true" to these fields, I made PR #41453 for that. Please test, thanks !

Add a Comment

Login with GitHub to post a comment