Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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.
Txp Builders – finely-crafted code, design and Txp
Offline
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.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
Bloke wrote #311790:
But doing that every page load might get tiresome so it’d be nice if we could flag this somehow in debugging mode.
Or perhaps the Diagnostics panel. Having it as part of the install would cover many (most?) instances of this issue. Likewise, now that the upgrade process won’t start if minimum spec isn’t met, is there scope to do a similar check for a valid timezone as part of the upgrade scripts?
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
gaekwad wrote #311791:
Or perhaps the Diagnostics panel.
That would work.
is there scope to do a similar check for a valid timezone as part of the upgrade scripts?
Yes and no. Yes we could do it, but as it’s not really an error, we probably shouldn’t force the upgrade to stop.
Sure, if we use a default, things might behave a bit weirdly and articles might not appear where you expect, but since PHP will drop back to a default without batting an eyelid, it’s not a big deal. The only reason it’s turned from a PHP warning to a Txp fatal error is because we don’t handle it properly; we assume the timezone is set properly, which is not the right thing to do.
The sensible – if slightly costly – thing to do is take the approach similar to what Drupal did above. Every page load, check if the ini timezone variable is set and if it’s not, force UTC. Repeat.
Also, in debugging mode, flag this so it forces people to either fix it for real or switch to Live to suppress it. What I don’t know is whether setting the timezone pref inside Txp is a good enough substitute for the php.ini
timezone key or if it MUST be set there. I’m a bit fuzzy on this area.
Last edited by Bloke (2018-05-15 20:42:21)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#18 2018-05-17 01:44:14
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: Feedback to: Textpattern CMS 4.7.0 Released
This is a great moment! Many thanks to everyone who has worked on the development of this new version. A huge step forward.
Now I will have to deal with all the improvements. I hope I can handle this. Until now I had little time for it, and much still seems difficult to me to understand. I haven’t always been able to follow the news in the forum. Life in Ecuador isn’t easy. And hopefully someday I can give something back to you.
Also many thanks to @jakob for the updates of the very important plug-ins bot_wtc and glz_custom_fields. What would we do without them?
Thanks and all my admiration for you.
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
In 4.7, Articles panel, I selected a few articles by checking the boxes and used the controls to change their status all at once. No problem. When done, the boxes on the articles were still checked. Shouldn’t they automatically uncheck at that point to confirm job well done?
I honestly can’t remember how it’s always been. It’s not a big deal; just seemed odd to me from a feedback standpoint.
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
It gives you an additional (visual) cue which articles you just modified – the (green) message box only tells you the ID. You don’t need to hunt for them (again), useful if they are not next to each other. Also, maybe you want to do some further action on those articles (add / modify a category maybe?) The multi-edit feature only allows one action at the time.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
Makes sense.
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
Destry wrote #311864:
I honestly can’t remember how it’s always been.
This was indeed a change in 4.7.0, for precisely the reasons phiw13 cited. You can now apply multiple actions more easily.
It also comes into its own on the Images and Files panels. As well as being able to select the category in advance for uploads, after you upload one (or more now!) images/files at once, the uploaded ones stay checked. This means you can (in most cases) immediately apply a multi-edit action to them without having to hunt for them again.
The only thing you need to watch on all panels is that you remember to uncheck the content if you want to apply a secondary action to a different set. But that’s a quick toggle of the check all/none checkbox.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
Could it be posssible to skip the part where user has to manually upload themes to a Web server? Is there some work done towards building some kind of autoinstaller for themes? I mean some kind of function that allows users to install themes simply by clicking a button or link.
Offline
Re: Feedback to: Textpattern CMS 4.7.0 Released
kuopassa wrote #311919:
some kind of function that allows users to install themes simply by clicking a button or link.
When we have our own themes site (which Phil is building) then potentially yes.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline