User tests: Successful: Unsuccessful:
Pull Request for Issue # none
This is due to throw new \InvalidArgumentException('A key is required');
in DatabaseQuery
because there are no tasks ids in the WHERE clause of the query.
Additionally, it was triggering a second bug:
Fatal error: Uncaught mysqli_sql_exception: Table '#_users' was not locked with LOCK TABLES in 4.1/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line 137
This also fixes other return
statements that did not unlock the table, blocking it for further processings.
In System/Scheduled Tasks, Options, Enable WebCron without having set any scheduled tasks. Then copy URL of webcron, and access it.
{"success":false,"message":"A key is required","messages":null,"data":null}<br />
<font size='1'><table class='xdebug-error xe-uncaught-exception' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Fatal error: Uncaught mysqli_sql_exception: Table 'j40b5_users' was not locked with LOCK TABLES in /home/beat/www/4.1/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line <i>137</i></th></tr>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> mysqli_sql_exception: Table 'j40b5_users' was not locked with LOCK TABLES in /home/beat/www/4.1/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php on line <i>137</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.1191</td><td bgcolor='#eeeeec' align='right'>2032256</td><td bgcolor='#eeeeec'>Joomla\CMS\Session\Storage\JoomlaStorage->close( )</td><td title='/home/beat/www/4.1/libraries/src/Session/Storage/JoomlaStorage.php' bgcolor='#eeeeec'>.../JoomlaStorage.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.1191</td><td bgcolor='#eeeeec' align='right'>2032728</td><td bgcolor='#eeeeec'>Joomla\Registry\Registry->__clone( )</td><td title='/home/beat/www/4.1/libraries/src/Session/Storage/JoomlaStorage.php' bgcolor='#eeeeec'>.../JoomlaStorage.php<b>:</b>133</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.1191</td><td bgcolor='#eeeeec' align='right'>2036824</td><td bgcolor='#eeeeec'><a href='http://www.php.net/function.unserialize' target='_new'>unserialize</a>( <span>$data = </span><span>'O:8:"stdClass":3:{s:7:"session";O:8:"stdClass":3:{s:7:"counter";i:101;s:5:"timer";O:8:"stdClass":3:{s:5:"start";i:1643824340;s:4:"last";i:1644622963;s:3:"now";i:1644623430;}s:5:"token";s:32:"e71c60635cf8a71d0e7e80587ff8aeec";}s:8:"registry";O:24:"Joomla\\Registry\\Registry":3:{s:7:"\000*\000data";O:8:"stdClass":0:{}s:14:"\000*\000initialized";b:0;s:9:"separator";s:1:".";}s:4:"user";O:20:"Joomla\\CMS\\User\\User":1:{s:2:"id";i:915;}}'</span> )</td><td title='/home/beat/www/4.1/libraries/vendor/joomla/registry/src/Registry.php' bgcolor='#eeeeec'>.../Registry.php<b>:</b>80</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.1191</td><td bgcolor='#eeeeec' align='right'>2056936</td><td bgcolor='#eeeeec'>Joomla\CMS\User\User->__wakeup( )</td><td title='/home/beat/www/4.1/libraries/vendor/joomla/registry/src/Registry.php' bgcolor='#eeeeec'>.../Registry.php<b>:</b>80</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.1191</td><td bgcolor='#eeeeec' align='right'>2057072</td><td bgcolor='#eeeeec'>Joomla\CMS\User\User->load( <span>$id = </span><span>915</span> )</td><td title='/home/beat/www/4.1/libraries/src/User/User.php' bgcolor='#eeeeec'>.../User.php<b>:</b>920</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>6</td><td bgcolor='#eeeeec' align='center'>0.1193</td><td bgcolor='#eeeeec' align='right'>2059136</td><td bgcolor='#eeeeec'>Joomla\CMS\Table\User->load( <span>$userId = </span><span>915</span>, <span>$reset = </span>??? )</td><td title='/home/beat/www/4.1/libraries/src/User/User.php' bgcolor='#eeeeec'>.../User.php<b>:</b>858</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>7</td><td bgcolor='#eeeeec' align='center'>0.1195</td><td bgcolor='#eeeeec' align='right'>2062160</td><td bgcolor='#eeeeec'>Joomla\Database\DatabaseDriver->setQuery( <span>$query = </span><span>class Joomla\Database\Mysqli\MysqliQuery { protected $bounded = [':userid' => class stdClass { ... }]; protected $parameterMapping = ['boolean' => 'boolean', 'int' => 'int', 'lob' => 'lob', 'null' => 'null', 'string' => 'string']; protected $db = class Joomla\Database\Mysqli\MysqliDriver { private ${Joomla\Database\DatabaseDriver}database = 'j4'; public $name = 'mysqli'; public $serverType = 'mysql'; protected $connection = class mysqli { ... }; protected $count = 18; protected $cursor = NULL; protected $executed = FALSE; protected $limit = 1; protected $nameQuote = '`'; protected $nullDate = '0000-00-00 00:00:00'; protected $offset = 0; protected $options = [...]; protected $sql = class Joomla\Database\Mysqli\MysqliQuery { ... }; protected $statement = class Joomla\Database\Mysqli\MysqliStatement { ... }; protected $tablePrefix = 'j40b5_'; protected $utf = TRUE; protected $errorNum = 0; protected $errorMsg = NULL; protected $transactionDepth = 0; protected $factory = class Joomla\Database\DatabaseFactory { ... }; protected $monitor = class Joomla\Database\Monitor\DebugMonitor { ... }; private ${Joomla\Database\DatabaseDriver}dispatcher = class Joomla\Event\Dispatcher { ... }; protected $utf8mb4 = TRUE; protected $mariadb = FALSE }; protected $sql = NULL; protected $type = 'select'; protected $alias = NULL; protected $element = NULL; protected $select = class Joomla\Database\Query\QueryElement { protected $name = 'SELECT'; protected $elements = [...]; protected $glue = ',' }; protected $delete = NULL; protected $update = NULL; protected $insert = NULL; protected $from = class Joomla\Database\Query\QueryElement { protected $name = 'FROM'; protected $elements = [...]; protected $glue = ',' }; protected $join = NULL; protected $set = NULL; protected $where = class Joomla\Database\Query\QueryElement { protected $name = 'WHERE'; protected $elements = [...]; protected $glue = ' AND ' }; protected $group = NULL; protected $having = NULL; protected $columns = NULL; protected $values = NULL; protected $order = NULL; protected $autoIncrementField = FALSE; protected $call = NULL; protected $exec = NULL; protected $merge = NULL; protected $querySet = NULL; protected $selectRowNumber = NULL; protected $nullDatetimeList = [0 => '0000-00-00 00:00:00', 1 => '1000-01-01 00:00:00']; protected $offset = 0; protected $limit = 0; protected $preparedIndex = 0 }</span>, <span>$offset = </span>???, <span>$limit = </span>??? )</td><td title='/home/beat/www/4.1/libraries/src/Table/User.php' bgcolor='#eeeeec'>.../User.php<b>:</b>104</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>8</td><td bgcolor='#eeeeec' align='center'>0.1195</td><td bgcolor='#eeeeec' align='right'>2062240</td><td bgcolor='#eeeeec'>Joomla\Database\Mysqli\MysqliDriver->prepareStatement( <span>$query = </span><span>'SELECT *\nFROM `j40b5_users`\nWHERE `id` = :userid'</span> )</td><td title='/home/beat/www/4.1/libraries/vendor/joomla/database/src/DatabaseDriver.php' bgcolor='#eeeeec'>.../DatabaseDriver.php<b>:</b>1900</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>9</td><td bgcolor='#eeeeec' align='center'>0.1195</td><td bgcolor='#eeeeec' align='right'>2062464</td><td bgcolor='#eeeeec'>Joomla\Database\Mysqli\MysqliStatement->__construct( <span>$connection = </span><span>class mysqli { public $affected_rows = -1; public $client_info = 'mysqlnd 8.1.2'; public $client_version = 80102; public $connect_errno = 0; public $connect_error = NULL; public $errno = 1100; public $error = 'Table \'j40b5_users\' was not locked with LOCK TABLES'; public $error_list = [0 => [...]]; public $field_count = 1; public $host_info = 'Localhost via UNIX socket'; public $info = NULL; public $insert_id = 0; public $server_info = '8.0.28-0ubuntu0.20.04.3'; public $server_version = 80028; public $sqlstate = 'HY000'; public $protocol_version = 10; public $thread_id = 200; public $warning_count = 0 }</span>, <span>$query = </span><span>'SELECT *\nFROM `j40b5_users`\nWHERE `id` = :userid'</span> )</td><td title='/home/beat/www/4.1/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php' bgcolor='#eeeeec'>.../MysqliDriver.php<b>:</b>1048</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>10</td><td bgcolor='#eeeeec' align='center'>0.1196</td><td bgcolor='#eeeeec' align='right'>2062952</td><td bgcolor='#eeeeec'><a href='http://www.php.net/mysqli.prepare' target='_new'>prepare</a>( <span>$query = </span><span>'SELECT *\nFROM `j40b5_users`\nWHERE `id` = ?'</span> )</td><td title='/home/beat/www/4.1/libraries/vendor/joomla/database/src/Mysqli/MysqliStatement.php' bgcolor='#eeeeec'>.../MysqliStatement.php<b>:</b>137</td></tr>
</table></font>
{"success":true,"message":null,"messages":null,"data":[]}
None.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration |
Labels |
Added:
?
|
I have tested this item
@beat thanks!
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-02-12 17:01:39 |
Closed_By | ⇒ | bembelimen | |
Labels |
Added:
?
|
Thx
I have tested this item✅ successfully on 0edc84b
Tested successfully in Joomla 4.1.0-rc5-dev in Wampserver 3.2.7 using PHP 8.1.2
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37010.