User tests: Successful: Unsuccessful:
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_templates |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-24 16:16:01 |
Closed_By | ⇒ | shim-sao | |
Labels |
Added:
?
|
It is my first PR with fork. I don't really know how it work :(
Status | Closed | ⇒ | New |
Closed_Date | 2020-07-24 16:16:01 | ⇒ | |
Closed_By | shim-sao | ⇒ |
Status | New | ⇒ | Pending |
no problem at all , all of us have started this way...
but please write
It is attached to an issues but I don't know where doing this.
I have tested this item
1. Code-review: The change is correct.
2. Real test: Successful, i.e. without that patch, the menu assignments are not saved, and with the patch they are saved.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
rtc
Do we still have a cs?
We have
->where('(' . $db->quoteName('checked_out') .' IS NULL OR ' . $db->quoteName('checked_out') . ' = :userid)')
Should not we have
->where('(' . $db->quoteName('checked_out') . ' IS NULL OR ' . $db->quoteName('checked_out') . ' = :userid)')
i.e. a space missing between the period and the singlequote?
Status | Ready to Commit | ⇒ | Pending |
Back to pending. @shim-sao please apply the suggested changes to fix PHP code style.
@infograf768 You are right. No idea though why the PHPCS check by drone didn't find it.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Changes after last 2 successful tests were only code style, so these tests are still valid => RTC.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-27 15:03:05 |
Closed_By | ⇒ | Quy | |
Labels |
Added:
?
|
Thanks
@shim-sao did you close this by mistake ?