Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11723

Can not agree to Terms of Service if more than one language is installed

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Labels:
      None
    • Environment:
      PHP: 5.3.15
      PHP-FPM: v2.3.0
      Postgresql : 9.2

      Description

      After I install the 3.0.11 American English Pack, user is unable to register any more.
      Steps to reproduce.
      1. instal 3.0.11 american english pack.
      2. in the user register form, american english as user langauge.
      3. user gets redirect to the terms and condition page.
      4. press I agree ...., it doesn't redirect user to the registration form.

        Issue Links

          Activity

          Hide
          wintstar wintstar added a comment -

          Works. Thanks.

          Show
          wintstar wintstar added a comment - Works. Thanks.
          Hide
          bantu Andreas Fischer added a comment -

          Seems to be a generic problem not related to a specific language pack. Probably a problem with the language dropdown on the registration page.

          Show
          bantu Andreas Fischer added a comment - Seems to be a generic problem not related to a specific language pack. Probably a problem with the language dropdown on the registration page.
          Hide
          Marc Marc added a comment -

          The fix is incorrect. The actual issue is caused by the change from:

          $agreed = (empty($_GET['change_lang'])) ? 0 : $agreed;

          To:

          $agreed = ($request->variable('change_lang', false)) ? 0 : $agreed;

          While changing the code, the line was changed from setting $agreed to 0 if change_lang is empty, to setting it to $agreed if it is empty.

          However, there are now more errors appearing on the next page which need to be fixed:

          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT
          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT
          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT
          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT
          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT
          [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT

          (it goes on like that for a while)

          Show
          Marc Marc added a comment - The fix is incorrect. The actual issue is caused by the change from: $agreed = (empty($_GET['change_lang'])) ? 0 : $agreed; To: $agreed = ($request->variable('change_lang', false)) ? 0 : $agreed; While changing the code, the line was changed from setting $agreed to 0 if change_lang is empty, to setting it to $agreed if it is empty. However, there are now more errors appearing on the next page which need to be fixed: [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT [phpBB Debug] PHP Notice: in file [ROOT]/includes/functions.php on line 1277: Undefined index: DATETIME_FORMAT (it goes on like that for a while)
          Hide
          bantu Andreas Fischer added a comment -

          [18:57:06] <Marc> bantu: http://tracker.phpbb.com/browse/PHPBB3-11723?focusedCommentId=40061&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40061
          [18:58:11] <bantu> Marc: yeah
          [18:58:16] <bantu> fix that mistake
          [18:58:22] <bantu> ignore the language pack stuff
          [18:58:36] <bantu> good work
          [18:58:52] <Marc> ah right, that's the lang pack being outdated
          [18:59:02] <bantu> change false to true?
          [18:59:06] <Marc> yeah
          [18:59:12] <Marc> will push a fix right away
          [18:59:41] <Marc> actually, I'd say change it to: $agreed = (!$request->is_set('change_lang')) ? 0 : $agreed;
          [19:00:28] <Marc> if that's ok with you?
          [19:01:23] <bantu> $agreed = $request->is_set('change_lang') ? $agreed : 0;
          [19:01:24] <bantu> ?
          [19:01:37] <Marc> or that :P
          [19:01:47] <Marc> inverse logic is what caused this to fail to begin with
          [19:02:01] <bantu> yeah, don't complicate things
          [19:03:42] <Marc> actually, the code differs from wha the comment says O.o
          [19:03:52] <Marc> / Setting back agreed to let the user view the agreement in his/her language
          [19:04:09] <Marc> which is not correct the way it was
          [19:04:14] <bantu> lo
          [19:04:14] <bantu> l
          [19:04:24] <bantu> please check 3.0.x behaviour
          [19:04:35] <bantu> i think you have to reread the terms if you change the language
          [19:04:38] <bantu> and this is by design
          [19:04:41] <Marc> hm, 3,0 behavior seems to be correct
          [19:05:06] <bantu> also, why is this an integer?
          [19:05:37] <Marc> $agreed␉␉␉= (int) $request->variable('agreed', false);
          [19:05:54] <bantu> o_O
          [19:06:38] <Marc> hm, it doesn't send me back now if I change the language O.o
          [19:06:49] <bantu> $agreed = $request->variable('agreed', false) && !$request->variable('change_lang', false); ?
          [19:08:06] <bantu> (not looking at the code)
          [19:09:23] <Marc> ah, it's not redirecting back to the agreement anymore, because you can change it on the agreement page
          [19:09:24] <Marc> the language
          [19:11:05] <Marc> then again, that makes the comment above it invalid :P
          [19:18:29] <-- asperous (~asperous@static-50-53-81-249.bvtn.or.frontiernet.net) has quit (Ping timeout: 245 seconds)
          [19:21:10] <Marc> I think I have a proper fix
          [19:21:12] <Marc> will push it later
          [19:21:16] <Marc> got to go now

          Show
          bantu Andreas Fischer added a comment - [18:57:06] <Marc> bantu: http://tracker.phpbb.com/browse/PHPBB3-11723?focusedCommentId=40061&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-40061 [18:58:11] <bantu> Marc: yeah [18:58:16] <bantu> fix that mistake [18:58:22] <bantu> ignore the language pack stuff [18:58:36] <bantu> good work [18:58:52] <Marc> ah right, that's the lang pack being outdated [18:59:02] <bantu> change false to true? [18:59:06] <Marc> yeah [18:59:12] <Marc> will push a fix right away [18:59:41] <Marc> actually, I'd say change it to: $agreed = (!$request->is_set('change_lang')) ? 0 : $agreed; [19:00:28] <Marc> if that's ok with you? [19:01:23] <bantu> $agreed = $request->is_set('change_lang') ? $agreed : 0; [19:01:24] <bantu> ? [19:01:37] <Marc> or that :P [19:01:47] <Marc> inverse logic is what caused this to fail to begin with [19:02:01] <bantu> yeah, don't complicate things [19:03:42] <Marc> actually, the code differs from wha the comment says O.o [19:03:52] <Marc> / Setting back agreed to let the user view the agreement in his/her language [19:04:09] <Marc> which is not correct the way it was [19:04:14] <bantu> lo [19:04:14] <bantu> l [19:04:24] <bantu> please check 3.0.x behaviour [19:04:35] <bantu> i think you have to reread the terms if you change the language [19:04:38] <bantu> and this is by design [19:04:41] <Marc> hm, 3,0 behavior seems to be correct [19:05:06] <bantu> also, why is this an integer? [19:05:37] <Marc> $agreed␉␉␉= (int) $request->variable('agreed', false); [19:05:54] <bantu> o_O [19:06:38] <Marc> hm, it doesn't send me back now if I change the language O.o [19:06:49] <bantu> $agreed = $request->variable('agreed', false) && !$request->variable('change_lang', false); ? [19:08:06] <bantu> (not looking at the code) [19:09:23] <Marc> ah, it's not redirecting back to the agreement anymore, because you can change it on the agreement page [19:09:24] <Marc> the language [19:11:05] <Marc> then again, that makes the comment above it invalid :P [19:18:29] <-- asperous (~asperous@static-50-53-81-249.bvtn.or.frontiernet.net) has quit (Ping timeout: 245 seconds) [19:21:10] <Marc> I think I have a proper fix [19:21:12] <Marc> will push it later [19:21:16] <Marc> got to go now
          Hide
          wintstar wintstar added a comment -

          Quoting myself from the tracker: marc17061 posted:
          Did you install a 3.0.11 language pack on 3.1-dev? If yes, then this issue is probably caused by a missing language variable and is most definitely not a bug.
          I was unable to reproduce this issue on 3.0.11.

          @marc1706I also have an additional language pack german-informell. I've upgraded this from 3.0.11 to 3.1.0-dev and have the bug "When changing the language it can not continue on "I agree to these terms". You can test it here http://test.wintstar.de/index.php. I have MySQL 5.1.67-log, PHP Version 5.4.17 and phpBB 3.1.0-dev Build 954."

          Show
          wintstar wintstar added a comment - Quoting myself from the tracker: marc17061 posted: Did you install a 3.0.11 language pack on 3.1-dev? If yes, then this issue is probably caused by a missing language variable and is most definitely not a bug. I was unable to reproduce this issue on 3.0.11. @marc1706I also have an additional language pack german-informell. I've upgraded this from 3.0.11 to 3.1.0-dev and have the bug "When changing the language it can not continue on "I agree to these terms". You can test it here http://test.wintstar.de/index.php . I have MySQL 5.1.67-log, PHP Version 5.4.17 and phpBB 3.1.0-dev Build 954."

            People

            • Assignee:
              EXreaction EXreaction [X] (Inactive)
              Reporter:
              ziweizhou ziweizhou [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development