Error Updating User (3.5 RC)

Asked by Andrew Weiner on 2014-01-11

Testing 3.5 RC. After I create a new user, I receive an error when attempting to access the user information.

The exception class is "PHPDS_databaseException" and the error code is 0. The content of the exception is as follow:
Error invoking a query of class "PAGINATION_readPaginationQuery"

   t1.user_id, t1.user_display_name, t1.user_name, t1.user_password, t1.user_email, t1.user_group, t1.user_role, t1.date_registered, t1.language,
   _db_core_users t1
   _db_core_user_groups t2
   t1.user_group = t2.user_group_id
   _db_core_user_roles t3
   t1.user_role = t3.user_role_id
   WHERE user_id != \'x\'

 LIMIT 0, 30

It appears that the user_id and proper db prefix is not being supplied to the sql query. This error also appears on pending users menu item.

Question information

English Edit question
PHPDevShell Edit question
Greg Edit question
Solved by:
Last query:
Last reply:
Greg (gregfr) said : #1

I can reproduce it, I'll fix it asap

Best Greg (gregfr) said : #2

The db prefix is handled at a lower level, so the query is fine on this. The problem is that PHPDS_query changed to protect the parameters by default, and many "old" queries still do the protection themselves. To fix that, we have to disable it for each said queries:

    protected $autoProtect = false;

(or to rewrite the query in a cleaner way).

I expect a lot of that, but I really think it's for the best, since it will make the user queries simpler and therefore less error-prone.

Greg (gregfr) said : #3

Fix commited:

BTW please prefer using the bug reporter for bugs :)


Andrew Weiner (rtacorp) said : #4

Thanks Greg, that solved my question.

Andrew Weiner (rtacorp) said : #5

Thanks. In the future, I will post bugs in the bug reporter.

Greg (gregfr) said : #6

Thanks! Don't hesitate to contact us if you have any question.