Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-05-15 12:10:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Feedback to: Textpattern CMS 4.7.0 Released

Please provide any feedback here related to Textpattern 4.7.0 Released.

We appreciate all feedback. Please check the issue queue before raising a problem.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#2 2018-05-15 12:14:50

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,732
GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Happy day! Big thank you from me to everyone who was a part of this release.

Offline

#3 2018-05-15 12:20:28

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,204
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

And from me too! Well done all of you!


TXP Builders – finely-crafted code, design and txp

Offline

#4 2018-05-15 15:50:58

Hennie
Member
From: Nederland
Registered: 2009-02-06
Posts: 18
Website

Re: Feedback to: Textpattern CMS 4.7.0 Released

Instead of the admin side I get this:

Warning “date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.”
in /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/vendors/Textpattern/L10n/Lang.php at line 481.

textpattern/lib/txplib_misc.php:1715 adminErrorHandler()
updateErrorHandler()
textpattern/vendors/Textpattern/L10n/Lang.php:481 date()
textpattern/vendors/Textpattern/L10n/Lang.php:414 Textpattern\L10n\Lang->upsertPack()
textpattern/update/_update.php:121 Textpattern\L10n\Lang->installFile()
textpattern/index.php:214 include()

Fatal error: Uncaught exception ‘Exception’ with message ‘update failed’ in /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/lib/txplib_misc.php:1719 Stack trace: #0 [internal function]: updateErrorHandler(2, ‘date(): It is n…’, ‘/var/www/vhosts…’, 481, Array) #1 /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/vendors/Textpattern/L10n/Lang.php(481): date(‘YmdHis’) #2 /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/vendors/Textpattern/L10n/Lang.php(414): Textpattern\L10n\Lang->upsertPack(Array) #3 /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/update/_update.php(121): Textpattern\L10n\Lang->installFile(‘nl’) #4 /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/index.php(214): include(‘/var/www/vhosts…’) #5 {main} thrown in /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/lib/txplib_misc.php on line 1719

On a shared server

Offline

#5 2018-05-15 16:02:54

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,732
GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Hennie wrote #311776:

Instead of the admin side I get this:

Warning “date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.”
in /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/vendors/Textpattern/L10n/Lang.php at line 481.

Try adding this to your textpattern/config.php file on the penultimate line

date_default_timezone_set('Europe/Amsterdam');

Does that help?

Offline

#6 2018-05-15 16:48:31

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Hennie wrote #311776:

date(): It is not safe to rely on the system’s timezone settings.

Don’t know the best way to defend against this. Perhaps we need to pass UTC (or a random timezone) just to shut it up if – and that’s the question, if – we can detect if one hasn’t been set already. Dunno. Will gladly take advice on this.

Is it related to this timezone issue?


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#7 2018-05-15 17:24:48

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: Feedback to: Textpattern CMS 4.7.0 Released

Thanks to each one of you for all your hours and days of hard work on this!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#8 2018-05-15 17:28:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: Feedback to: Textpattern CMS 4.7.0 Released

On fresh installs, and if the error is detected, it would be good to suggest a timezone for the config.php file with a note that it could be changed. I would go for UTC, GMT or date_default_timezone_set('Europe/London');.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#9 2018-05-15 17:47:43

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Right, that makes some kind of sense. But in this case I think we’ve dropped the ball a bit because PHP is only issuing a warning and it’s saying that it’s chosen a fallback on the user’s behalf, but then our upgrade script throws its toys out the pram and fails outright. That’s not good.

Hmmm… how to fix this, how to fix this…


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#10 2018-05-15 17:56:21

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,386
Website GitHub Mastodon Twitter

Re: Feedback to: Textpattern CMS 4.7.0 Released

What if instead of this warning:

Warning “date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.”
in /var/www/vhosts/decomputerclub.nl/httpdocs/textpattern/vendors/Textpattern/L10n/Lang.php at line 481.

We could have this one:

Warning “date(): It is not safe to rely on the system’s timezone settings. Please add your timezone in the penultimate line of the /textpattern/config.php file. The timezone set should look like: date_default_timezone_set('Europe/London');. A list of timezones, supported by php, can be found on php.net/manual/en/timezones.php.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2018-05-15 18:21:10

Hennie
Member
From: Nederland
Registered: 2009-02-06
Posts: 18
Website

Re: Feedback to: Textpattern CMS 4.7.0 Released

Try adding this to your textpattern/config.php file on the penultimate line

date_default_timezone_set('Europe/Amsterdam');...

Does that help?

Well, bingo! After I searched for ‘penultimate’ :-)
Thanks!

Offline

#12 2018-05-15 18:42:26

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,732
GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Hennie wrote #311785:

Well, bingo! After I searched for ‘penultimate’ :-)

Great news! Your English is much better than my Dutch, but I think I mean ‘voorlaatste’.

Offline

#13 2018-05-15 18:45:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,732
GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

Bloke wrote #311778:

Perhaps we need to pass UTC (or a random timezone) just to shut it up if – and that’s the question, if – we can detect if one hasn’t been set already. Dunno. Will gladly take advice on this.

If the timezone isn’t set, default to Etc/UTC. That’s a standard, not geographical, and can be overridden in prefs easily enough.

Is it related to this timezone issue?

It’s a stretch, but there is a connection. Having Etc/UTC available would solve a few snags like this. See also #403 (among others).

Last edited by gaekwad (2018-05-15 18:46:01)

Offline

#14 2018-05-15 18:58:35

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

In reply to colak #311784:

What if instead of this warning… we could have…

I think that error message is thrown by PHP. We don’t have a say in it as far as I know.

gaekwad wrote #311787:

If the timezone isn’t set, default to Etc/UTC.

Providing we can accurately trap this error, perhaps through some judicial try... catch logic (and not have to do it every time so it doesn’t slow stuff down), then yes.

It makes sense to try and default to something like that during setup/upgrade. I’d far rather do it there once – even if it’s the wrong timezone – than every time we call a date function, which is potentially more computationally expensive. But I don’t know if that’s possible. We can’t write to php.ini.

See also #403 (among others).

Jeez, and that issue’s only 5 years old now. We really should have fixed this by now.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#15 2018-05-15 19:03:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,455
Website GitHub

Re: Feedback to: Textpattern CMS 4.7.0 Released

P.S. Drupal solved it like this:

// Make sure PHP has a valid time zone set.
$timezones = \DateTimeZone::listIdentifiers();
$timezone = ini_get('date.timezone');
if (empty($timezone) || !in_array($timezone, $timezones)) {
  ini_set('date.timezone', 'UTC');
}

But doing that every page load might get tiresome so it’d be nice if we could flag this somehow in debugging mode.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB