?
avatar andykirk
andykirk
7 Oct 2014

How to reproduce:

  1. Make sure the "Global Configuration > Server > Server Time Zone" setting is set to something, e.g. Europe/London:
    default-timezone

  2. Make sure you're logged into the Admin area with a user that hasn't already set a language and go to "Basic Settings" - you should see the timezone isn't showing the Global setting:
    timezone-not-set

The fallout from this is that whenever a user saves their profile they unwittingly set their timezone "Abidjan".

The line responsible for setting the default value is:
\libraries\joomla\form\fields\timezone.php line 131:
if (strlen($this->value) == 0 && empty($keyValue))

As far as I can tell, $keyValue is never empty as it's the users ID, and thus this condition is never met.
Changing the line to just:
if (strlen($this->value) == 0)
fixes the problem for me though I'm not sure if it has any other unintended consequences

Thanks

avatar andykirk andykirk - open - 7 Oct 2014
avatar wilsonge
wilsonge - comment - 7 Oct 2014

Hmmm this looks like a nasty old bug. But I think the thing about the default value is actually expected behaviour. What's the bug is that the form should take the value of the existing timezone saved for the user - which it looks like it's not :/

avatar infograf768
infograf768 - comment - 8 Oct 2014

I can't reproduce this here;
I get for a new user:
screen shot 2014-10-08 at 08 50 19

avatar andykirk
andykirk - comment - 8 Oct 2014

@infograf768, interesting, thanks. I don't see the 'Use Default' option in the tz list at all. I'll investigate further.

avatar infograf768
infograf768 - comment - 8 Oct 2014
<field name="timezone" type="timezone"
                label="COM_ADMIN_USER_FIELD_TIMEZONE_LABEL"
                description="COM_ADMIN_USER_FIELD_TIMEZONE_DESC"
            >
                <option value="">JOPTION_USE_DEFAULT</option>
            </field>
avatar brianteeman
brianteeman - comment - 8 Oct 2014

I cant replicate this either.

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4476.

avatar brianteeman brianteeman - change - 8 Oct 2014
Status New Closed - Unconfirmed Report
avatar brianteeman brianteeman - close - 8 Oct 2014
avatar zero-24 zero-24 - close - 8 Oct 2014
avatar brianteeman brianteeman - change - 8 Oct 2014
Closed_Date 0000-00-00 00:00:00 2014-10-08 08:16:43
avatar andykirk
andykirk - comment - 8 Oct 2014

Ok, maybe something is wrong with my installation because get absolutely no 'Use Default' options in any of the fields, for example:
ss1
ss2
ss3

However on fresh installation I can't reproduce either. If I get to the bottom of it (ideas welcome) I'll come back and ask to re-open the issue.

Thanks.

avatar infograf768
infograf768 - comment - 8 Oct 2014

I suggest you overwrite your site with a fresh 3.3.7

avatar andykirk
andykirk - comment - 8 Oct 2014

Ahhh, sorry everyone - it was a dodgy plugin that was causing the error. I thought I'd disabled them all but this one slipped through.

Thanks again.

avatar zero-24 zero-24 - change - 7 Jul 2015
Labels Added: ?

Add a Comment

Login with GitHub to post a comment