XF 1.3 Please select valid time zone error on register page

bcercan

Active member
Hello,

I've just edited my register_form template to remove birthday and gender selection. And know there is only Username, E-mail, Password, Pasword Confirm and Captcha fields.

The problem is when I try to register I filled all fields but it gives an error like "please select valid time zone"

What I'm missing?
 
If it happened after an edit you made, it may imply that you made an additional change or an incompatible change. You may wish to revert the change and try again, being sure you know what you're removing.
 
Oh I found it. I didn't see that I removed this part:

Code:
<dl class="ctrlUnit" style="display: none">
        <dt><label for="ctrl_timezone">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="timezone" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_timezone">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl>

Thanks
 
I am getting this too on 1.5 sometimes during testing and I can't figure out why. That timezone code does still exist in the template, but it's not displayed to the user. Could it be something to do with using my browser's incognito mode when doing test signups? Even then, it's still at random and doesn't happen every time.

In this case it actually reset all the data I entered too.

signup-error.webp
 
To take customizations out of the equation, please confirm whether you can reproduce it (even sporadically) with the default/unmodified file and with add-ons disabled.

If so, that may point to your session not being maintained, which could indicate not enough space in a cache (if you have enabled sessions in the cache) or your IP changing (either on your end or via a proxy).
 
Hello,

@Mike This error still exist, no modification on templates or on style.

I found in the register_form template the flowing part that controls showing the time zone in registration form been hidden by a css code (style="display: none") so that's why we get this error. Same error can be reproduced by directly clicking on Accept the terms and rules and hit Register :

PHP:
    <dl class="ctrlUnit" style="display: none">
        <dt><label for="ctrl_{$fieldMap.timezone}">{xen:phrase time_zone}:</label></dt>
        <dd>
            <select name="{$fieldMap.timezone}" class="textCtrl {xen:if $fields.timezoneAuto, 'AutoTimeZone'} OptOut" id="ctrl_{$fieldMap.timezone}">
                <xen:foreach loop="$timeZones" key="$identifier" value="$name">
                    <option value="{$identifier}" {xen:selected "{$identifier} == {$fields.timezone}"}>{$name}</option>
                </xen:foreach>
            </select>
        </dd>
    </dl>
 
I found in the register_form template the flowing part that controls showing the time zone in registration form been hidden by a css code (style="display: none") so that's why we get this error.
Hiding it doesn't cause the issue. The value is still sent to the server.

We haven't had any other reports of this that didn't involve one of the things discussed above, so please ensure you can confirm the issue on a 100% default style and no add-ons. (If you can, can you confirm it on a demo?)
 
Hiding it doesn't cause the issue. The value is still sent to the server.

We haven't had any other reports of this that didn't involve one of the things discussed above, so please ensure you can confirm the issue on a 100% default style and no add-ons. (If you can, can you confirm it on a demo?)


Correcting my previous reply to make it clear so you can reproduce the error.

1. Go to the registration form
2. Go directly without filling any info to the bottom, thick on "I agree to the terms and rules." and click Sign up
3. Refresh the page from the browser ... You will get the Error list and you will find in the list (7.Please select a valid time zone.)

As you said, the value still sent to the server even the field of time zone is hidden, so the error shouldn't show up at all.
 
3. Refresh the page from the browser ... You will get the Error list and you will find in the list (7.Please select a valid time zone.)
This is the problem and ultimately expected. The registration form uses a changing key which helps thwart automated registrations. By refreshing the page, the submitted data is using the old key and thus not picked up.
 
This is the problem and ultimately expected. The registration form uses a changing key which helps thwart automated registrations. By refreshing the page, the submitted data is using the old key and thus not picked up.

If the field not mandatory and always selected & hidden, why that error message appears. I think it should be removed from data submission checking.
 
Top Bottom