Save a template style with menu assignments (4.0-beta-3-dev)
Template style saved with menu assignments
None of the menu assignments are saved
Joomla 4.0-beta-3-dev - Linux - PHP 7.4.8 - MySql 5.7.28
In the Administrator StyleModel.php function Save, replace in the 2 queries :
->whereIn($db->quoteName('checked_out'), [null, $userId])
by something like :
->where($db->quoteName('checked_out') .' IS NULL OR ' . $db->quoteName('checked_out') . ' = :userid')
->bind(':userid', $userid, ParameterType::INTEGER)
I think maybe there is something wrong in the query with whereIn
php null
and the mysql check IS NULL
= NULL
or IN (NULL)
may not work sometimes
->where($db->quoteName('checked_out') . '= NULL')
=> not work
->whereIn($db->quoteName('checked_out'), [null])
=> not work
Ok, thank you, it's done.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-24 16:47:26 |
Closed_By | ⇒ | Quy |
Your fix is correct. Do you want to submit a PR?