-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 #58
Comments
Hello Helmut, thank you for reporting the issue. Which version of sexy_polling do you use? Have you installed the latest version v4.2.0? If not, you should upgrade first. If you have the latest version, it would help to get a more detailed information, which part of the sexy_polling code causes the issue. Would it be possible for you to switch on debugging with maximum error reporting and post the detailed error messages?
|
Hi Jefferson,
I installed 4.6 because I got the “country”-message despite running DB-Version 5.7.40. So maybe it would help if you can tell me what you mean with “incompatibility with the database configuration”?
Best Regards!
Helmut
Von: Jefferson49 ***@***.***>
Gesendet: Mittwoch, 18. Oktober 2023 13:28
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Hello Helmut, thank you for reporting the issue.
Which version of sexy_polling do you use? Have you installed the latest version v4.2.0? If not, you should upgrade first.
If you have the latest version, it would help to get a more detailed information, which part of the sexy_polling code causes the issue. Would it be possible for you to switch on debugging with maximum error reporting and post the detailed error messages?
* Joomla -> Global configuration -> System -> Debug System -> Yes
* Joomla -> Global configuration -> Server -> Error Reporting -> Maximum
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO4FNMLFEROWUDOTYCDX764MLAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRYGI2TAMJXGA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO222RHOWHM2RMDDC6TX764MLA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJMVNTU.gif> Message ID: ***@***.*** ***@***.***> >
|
To be honest: I do not know exactly yet. The error message is clearly related to the database, since "country" is a column in the database and the default value is a typical database setting. In the past, the "country cant have default value" seemed to be related to the database version. You are the second user to report that the error occurs with a newer database version. The similarity with issue #49 could be that a PHP version greater than 8.0 is used. Maybe, there was a change in the PHP MySQL libraries between PHP 8.0 and 8.1, which causes this issue. It would be really helpful to get the full error stack of the PHP error. The error stack shows the order of all the PHP functions, which were called and it would be possible to see, which line of code in the plugin originated the function calls, which finally end up in the error. The provided error message does not contain enough information, since the plugin does not call the strftime() function directly. I have already check that. |
Another place to look for the PHP error stack trace would be the PHP error log files on the server. |
We need to differenciate between 2 errors:
It would be helpful to get more error logs for both of the cases. |
Okay, I will see what I can find, first of all the exact error that I get, when I try to install 4.2.0 in a PHP 8.0.30/MySQL 5.7.40-environment:
“BLOB, TEXT, GEOMETRY or JSON column 'country' can't have a default value”
Best regards!
Von: Jefferson49 ***@***.***>
Gesendet: Mittwoch, 18. Oktober 2023 15:10
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
We need to differenciate between 2 errors:
1. "... country cant have a default value" during installation of v4.2.0
2. "Function strftime() is deprecated" if using v4.1.6
It would be helpful to get more error logs for both of the cases.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO4HJLFJJJZZ35KWLZDX77ILZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRYGQZDEMZYGA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO27HBOGXGC2Q4OF7Y3X77IL3A5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJM756Y.gif> Message ID: ***@***.*** ***@***.***> >
|
Hi,
an additional information: As far as I see in the documentation, MySQL from Version 5.7 upwards do not allow to set a default value for those data-types.
Best
Von: Jefferson49 ***@***.***>
Gesendet: Mittwoch, 18. Oktober 2023 15:10
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
We need to differenciate between 2 errors:
1. "... country cant have a default value" during installation of v4.2.0
2. "Function strftime() is deprecated" if using v4.1.6
It would be helpful to get more error logs for both of the cases.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO4HJLFJJJZZ35KWLZDX77ILZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRYGQZDEMZYGA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO27HBOGXGC2Q4OF7Y3X77IL3A5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJM756Y.gif> Message ID: ***@***.*** ***@***.***> >
|
The result of my internet search is as follows: It is not allowed to set a default value as a "literal". However, since a certain MySQL version (5.7.24/8.0.13), it seems to be allowed to set the default value by an "expression": |
After further considerations, I found some alternative SQL expressions to modify the code a little bit. I also found some area in the code, which might have resulted in errors during an installation from scratch. I created a beta version with some improvements in the code: Maybe, you can check if this version fixes the (installation) issue. |
Looks like "Function strftime() is deprecated" is an issue in the Joomla platform: joomla/joomla-cms#41266 Pull requests with changes in the code seem to be scheduled for Joomla 4.4 |
Hello, unfortunately it does not work – I updated Joomla to 4.4. before as it was published just yesterday or so.
Best regards!
Von: Jefferson49 ***@***.***>
Gesendet: Mittwoch, 18. Oktober 2023 19:59
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
After further considerations, I found some alternative SQL expressions to modify the code a little bit. I also found some area in the code, which might have resulted in errors during an installation from scratch.
I created a beta version with some improvements in the code:
com_sexypolling_v4.2.1beta1.zip <https://github.com/Jefferson49/Joomla_plugin_sexypolling_reloaded/files/13031853/com_sexypolling_v4.2.1beta1.zip>
Maybe, you can check if this version fixes the (installation) issue.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMOZUCABSKW5HVWP5BITYAAKHPAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGA3DCMJUGQ> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO6Z5MVBOMPTV25LNQLYAAKHPA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJOG5RQ.gif> Message ID: ***@***.*** ***@***.***> >
|
I tried the old Version with Joomla 4.4 and could install it. Nevertheless I get an error when I try to edit the Example Poll: Speichern fehlgeschlagen. Fehler: Incorrect date value: 'NOW' for column 'date_start' at row 1.
The Date Format ist F j, Y, der start-date is 2023-01-11. In one of my earlier trys it helped to change the date format to yyyy-mm-dd, but that also do not work any more.
Best regards!
Von: Jefferson49 ***@***.***>
Gesendet: Mittwoch, 18. Oktober 2023 22:59
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Looks like "Function strftime() is deprecated" is an issue in the Joomla platform: joomla/joomla-cms#41266 <joomla/joomla-cms#41266>
Pull requests with changes in the code seem to be scheduled for Joomla 4.4
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO4UXZWCJUAF63E4SM3YAA7IBAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZGMYTAMJTGM> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO6YSC6AQPGFF65E4JLYAA7IBA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJOWD3K.gif> Message ID: ***@***.*** ***@***.***> >
|
Bad luck. Joomla 4.4 should not make a difference. I think there exists a difference how the MySQL implementations handle the default values. On my own servers, everything works fine, but obviously other MySQL implementations do not accept this part of the code. |
I got the same error yesterday and created an issue #59 for it. It is already fixed and will be included in the next release. As a short term workaround, you can simply change the "Start Date" of the default example poll. Afterwards, you should be able to save the poll. Hint: There is also an issue #60 about saving a poll with an empty "Start Date". This issue can be simply avoided by setting a proper start date. |
Thank you – that works.
And thank you for your efforts!!!
Best regards,
Helmut
Von: Jefferson49 ***@***.***>
Gesendet: Donnerstag, 19. Oktober 2023 10:44
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Nevertheless I get an error when I try to edit the Example Poll: Speichern fehlgeschlagen. Fehler: Incorrect date value: 'NOW' for column 'date_start' at row 1.
I got the same error yesterday and created an issue #59 <#59> for it. It is already fixed and will be included in the next release.
As a short term workaround, you can simply change the "Start Date" of the default example poll. Afterwards, you should be able to save the poll.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO5Z3FCRQ3GIODFVZXTYADR6ZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGM2DGNJXG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO7ZZJFKDF775ALZ6GTYADR6ZA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJQVGJS.gif> Message ID: ***@***.*** ***@***.***> >
|
Hello,
now I get an additional error when I try to edit the answers in the version 4.6.:
Field 'country' doesn't have a default value.
Best,
Helmut
Von: Jefferson49 ***@***.***>
Gesendet: Donnerstag, 19. Oktober 2023 10:44
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Nevertheless I get an error when I try to edit the Example Poll: Speichern fehlgeschlagen. Fehler: Incorrect date value: 'NOW' for column 'date_start' at row 1.
I got the same error yesterday and created an issue #59 <#59> for it. It is already fixed and will be included in the next release.
As a short term workaround, you can simply change the "Start Date" of the default example poll. Afterwards, you should be able to save the poll.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO5Z3FCRQ3GIODFVZXTYADR6ZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGM2DGNJXG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO7ZZJFKDF775ALZ6GTYADR6ZA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJQVGJS.gif> Message ID: ***@***.*** ***@***.***> >
|
Hi, an additional Info: That error seems only to occur, when I try to insert votes. I don’t need this really and filled in all fields only for testing purposes, so I get along with this, but in general maybe it should be fixed as well.
Best regards!
Von: Jefferson49 ***@***.***>
Gesendet: Donnerstag, 19. Oktober 2023 10:44
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Nevertheless I get an error when I try to edit the Example Poll: Speichern fehlgeschlagen. Fehler: Incorrect date value: 'NOW' for column 'date_start' at row 1.
I got the same error yesterday and created an issue #59 <#59> for it. It is already fixed and will be included in the next release.
As a short term workaround, you can simply change the "Start Date" of the default example poll. Afterwards, you should be able to save the poll.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO5Z3FCRQ3GIODFVZXTYADR6ZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGM2DGNJXG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO7ZZJFKDF775ALZ6GTYADR6ZA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJQVGJS.gif> Message ID: ***@***.*** ***@***.***> >
|
And hopefully the last error I encountered, this one is in the frontend and can be “solved” when I set the error-reporting to “no”, but nevertheless I wanted to let you know:
Best Regards!
Von: Jefferson49 ***@***.***>
Gesendet: Donnerstag, 19. Oktober 2023 10:44
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
Nevertheless I get an error when I try to edit the Example Poll: Speichern fehlgeschlagen. Fehler: Incorrect date value: 'NOW' for column 'date_start' at row 1.
I got the same error yesterday and created an issue #59 <#59> for it. It is already fixed and will be included in the next release.
As a short term workaround, you can simply change the "Start Date" of the default example poll. Afterwards, you should be able to save the poll.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO5Z3FCRQ3GIODFVZXTYADR6ZAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZQGM2DGNJXG4> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO7ZZJFKDF775ALZ6GTYADR6ZA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJQVGJS.gif> Message ID: ***@***.*** ***@***.***> >
|
This is kind of a dilemma: From Joomla 3 to 4 the database strategy changed and Joomla 4 requires to always write some value to all columns. If no value is available, it reports "doesn't have a default value". That's why I tried to change the database definition and define default values in the database. However, some servers do not allow to set the default values :-( Since there are too many issues, I will have to think about a different solution. |
The "insert votes" issue with v4.1.6 is alredy documented in #37. It was fixed with v4.1.7 (which does not help in your case) |
About the frontend error: I guess you wanted to described it after the "let you know:", but it is not included here. |
I restructured the SQL commands and created a new beta version. Maybe, you can try it: |
Further testing with the new beta version looks very promising. It really seems to be a good alternative to solve the issues with " ... cant have a default value" or "... doesnt have a default value". If you have some time, it would be very helpful to get feedback if it runs on your server, where the issue was reproducible. If the issues are gone, I would release the new version. |
Hello,
sorry for the late answer, but I was in the very north of Europe for some time now and the possibilities to communicate are not so great there. But now I am back, and I will start testing it and will give you an answer as soon as possible.
All the Best,
Helmut
Von: Jefferson49 ***@***.***>
Gesendet: Samstag, 21. Oktober 2023 10:04
An: Jefferson49/Joomla_plugin_sexypolling_reloaded ***@***.***>
Cc: heli63 ***@***.***>; Author ***@***.***>
Betreff: Re: [Jefferson49/Joomla_plugin_sexypolling_reloaded] Deprecated: Function strftime() is deprecated /libraries/src/Form/Field/CalendarField.php on line 322 (Issue #58)
com_sexypolling_v4.2.1beta2.zip <https://github.com/Jefferson49/Joomla_plugin_sexypolling_reloaded/files/13046676/com_sexypolling_v4.2.1beta2.zip>
Further testing with the new beta version looks very promising. It really seems to be a good alternative to solve the issues with " ... cant have a default value" or "... doesnt have a default value".
If you have some time, it would be very helpful to get feedback if it runs on your server, where the issue was reproducible. If the issues are gone, I would release the new version.
—
Reply to this email directly, view it on GitHub <#58 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/BCUFMO762MT66O7EXBKOGHDYAN6YNAVCNFSM6AAAAAA6FIHNYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTG4YTEMJVHA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/BCUFMO6F57AIAL3PA2B2CNLYAN6YNA5CNFSM6AAAAAA6FIHNYOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTJXCZR4.gif> Message ID: ***@***.*** ***@***.***> >
|
Thanx for the update! Just recently, I published a new release v5.0.0, which is avoiding installation errors of the tpye "column 'country' can't have a default value". Maybe, you can check if the new version also solves the issues you described. |
Hello, when i want to run your program with php 8.1. I get the error as shown above. With php 8.0. everything is fine.
Best regards!
Helmut
The text was updated successfully, but these errors were encountered: