Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-7425

ACP Permissions: SELECT DISTINCT error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 3.0.1
    • ACP
    • None
    • PHP Environment: 5.2.6
      Database: PostgreSQL 8.2.7

      When attempting to alter forum permissions this error is presented

      SQL ERROR [ postgres ]
       
      ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list []
       
      SQL
       
      SELECT DISTINCT u.user_id, u.username FROM phpbb_users u, phpbb_acl_users a WHERE u.user_id = a.user_id AND a.forum_id IN (1, 2) AND (a.auth_option_id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30) OR a.auth_role_id IN (14, 15, 16, 17, 18, 19, 20, 21, 22)) ORDER BY u.username_clean, u.user_regdate ASC
       
      BACKTRACE
       
      FILE: includes/db/postgres.php
      LINE: 177
      CALL: dbal->sql_error()
       
      FILE: includes/acp/acp_permissions.php
      LINE: 1165
      CALL: dbal_postgres->sql_query()
       
      FILE: includes/acp/acp_permissions.php
      LINE: 399
      CALL: acp_permissions->retrieve_defined_user_groups()
       
      FILE: includes/functions_module.php
      LINE: 471
      CALL: acp_permissions->main()
       
      FILE: adm/index.php
      LINE: 74
      CALL: p_master->load_active()

      The attached patch simply adds the fields listed in the "ORDER BY" to the select list. Once applied this error is not seen.

            Kellanved Kellanved [X] (Inactive)
            geffy geffy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: