Dotclear

Ticket #1956 (closed defect: fixed)

Opened 12 years ago

Last modified 9 years ago

Issue with Dotclear 2.6.2 and sqlite -> user management

Reported by: le_top Owned by: team
Priority: normal Milestone: 2.9
Component: module:admin Version: 2.6.2
Severity: blocker Keywords: user management, sqlite
Cc:

Description

Hi User management is not possible with my dotclear + sqlite installation. When clicking on Users (Utilisateurs in French) which links to /admin/users.php, I get the following error message: ambiguous column name: user_id (1)

Change History

comment:1 Changed 11 years ago by peterk

This bug is also present in version 2.6.3. It's cause: default sorting column set to 'user_id' in admin/users.php on line 54 (in version 2.6.3):

$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'user_id';

Fix: change the above to

$sortby = !empty($_GET['sortby']) ?	$_GET['sortby'] : 'U.user_id';

The error shows up in inc/core/class.dc.core.php, around lines 503...513 (in version 2.6.3), which generates this query:

SELECT U.user_id,user_super,user_status,user_pwd,user_change_pwd,user_name,user_firstname,user_displayname,user_email,user_url,user_desc, user_lang,user_tz, user_post_status,user_options, count(P.post_id) AS nb_post FROM dc_user U LEFT JOIN dc_post P ON U.user_id = P.user_id WHERE NULL IS NULL GROUP BY U.user_id,user_super,user_status,user_pwd,user_change_pwd,user_name,user_firstname,user_displayname,user_email,user_url,user_desc, user_lang,user_tz,user_post_status,user_options  ORDER BY user_id asc  LIMIT 30 OFFSET 0;

Dotclear experts: I don't know why/whether this doesn't fail with other DB systems - please investigate.

This is a blocker for Automated testing of Dotclear -  http://forum.dotclear.org/viewtopic.php?pid=328372.

comment:2 Changed 11 years ago by franck

The fix should not be on line 54, as proposed, because of test done on line 67.

The U prefix should also be not known by this part of code and we need to find a better (and more elegant) way to fox that.

comment:3 Changed 10 years ago by franck

is this bug still relevant?

comment:4 Changed 9 years ago by peterk

Hi Franck,

Thanks. This has been fixed.

Would you close this ticket, please.

comment:5 Changed 9 years ago by franck

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from A definir to 2.9
Note: See TracTickets for help on using tickets.

Sites map