in front or backand create new user -> field ID set 0 automaticly -> get error
new user
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 2)' at line 3 SQL=INSERT INTO `#__user_usergroup_map` (`user_id`,`group_id`) VALUES (, 2)
Joomla! 3.6.0 Stable [ Noether ] 12-July-2016 21:14 GMT
Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Apache/2.4.10 (Unix)
PHP 7.0.8
mysql 5.7.12
If the problem can also understand. Every new user gets the ID 0
But real problem is probably earlier:
https://github.com/joomla/joomla-cms/blob/staging/libraries/joomla/table/user.php#L317
@chillside
Can you change line 373 for a few seconds:
from
->values($this->id . ', ' . $group);
to
->values($this->id . ',, ' . $group);
and test/try to add new user.
How it will look like the sql error/query?
@csthomas change 373 line
Сохранить не удалось из-за ошибки: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', 2)' at line 3 SQL=INSERT INTO `#__user_usergroup_map` (`user_id`,`group_id`) VALUES (,, 2)
UPD. User created with this error, but his User Group is empty. And if i try edit this user - all fields is empty..
You have to check you #__users table. By phpMyadmin or similar.
Try to find users with id=0.
user with id 0 found.. first row in #users table
It may be mysql error.
Can you add row to #__users table manually.
Add one row with random data, after success delete it.
add new row in phpMyAdmin - user visible in admin panel and all fields is ok on edit user page
INSERT INTO `***_users` (`id`, `name`, `username`, `email`, `password`, `block`, `sendEmail`, `registerDate`, `lastvisitDate`, `activation`, `params`, `lastResetTime`, `resetCount`, `otpKey`, `otep`, `requireReset`) VALUES ('99999', 'name', 'username', 'ebala@ya.ru', '***********', '0', '0', '2016-07-18 00:00:00', '0000-00-00 00:00:00.000000', '', '', '0000-00-00 00:00:00.000000', '0', '', '', '0');
In Joomla Backend:
Global Configuration->Server Database Setttings:
If that not help then it may take time to find a solution.
DBtype is MySQLi
if set MySQL (PDO):
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 2)' at line 3
Query which generate above error is suspicious.
Do you back this change?:
->values($this->id . ',, ' . $group);
If not do it.
And check again.
Back to mysqli.
I have forgotten to ask does a new added user by joomla has user id > 0?
in file /user.php#L317 i set default value
if i add user in admin user get ID 0 (visible in phpmyadmin), if add new row on phpmyadmin > id sets normal, from mysql query
The other solution may be to replace libraries/joomla libraries/cms and libraries/legacy by fresh from
https://github.com/joomla/joomla-cms/releases/download/3.6.0/Joomla_3.6.0-Stable-Full_Package.zip
Copy libraries/ to libraries_old/
Then delete cms, legacy and joomla directory from libraries/ [IMPORTANT]
Then copy from zip above directories to libraries/
Please use the forum to determine whether it is an issue with your environment or Joomla. Properly describe the issue here when it turns out to be an issue with Joomla!!
hmm.. what about "Reinstall Joomla core files" button in Joomal Update Page ? Dont gives a positive result.. Now I'll try your variant
lost AUTO_INCREMENT checkbox in #_users ID field. closed
So, use the proper channel for reporting issues! Again this is about Joomla! Software, not MySQL !
It looks like the update for the MySQL did not put the AUTO_INCREMENT to this table, because for some reason the ID also was not primary Key. I had this issue as well after upgrading Joomla to the latest version
Can't reproduce here.