[4.0] fix Templates : Edit style - unsaved menu assignments#30183
[4.0] fix Templates : Edit style - unsaved menu assignments#30183Quy merged 6 commits intojoomla:4.0-devfrom shim-sao:4.0-dev
Conversation
|
@shim-sao did you close this by mistake ? |
|
It is my first PR with fork. I don't really know how it work :( |
|
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. |
administrator/components/com_templates/src/Model/StyleModel.php
Outdated
Show resolved
Hide resolved
administrator/components/com_templates/src/Model/StyleModel.php
Outdated
Show resolved
Hide resolved
Co-authored-by: SharkyKZ <sharkykz@gmail.com>
Co-authored-by: SharkyKZ <sharkykz@gmail.com>
|
I have tested this item ✅ successfully on 26d4f96 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
|
@SharkyKZ If you have a bit time, could you test, too? Thanks in advance. |
|
I have tested this item ✅ successfully on 26d4f96 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
|
rtc This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
|
Do we still have a cs? i.e. a space missing between the period and the singlequote? |
administrator/components/com_templates/src/Model/StyleModel.php
Outdated
Show resolved
Hide resolved
administrator/components/com_templates/src/Model/StyleModel.php
Outdated
Show resolved
Hide resolved
|
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. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
|
I have tested this item ✅ successfully on 39e1640 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
|
Changes after last 2 successful tests were only code style, so these tests are still valid => RTC. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30183. |
|
Thanks |
…0183) * [4.0] fix Templates : Edit style - unsaved menu assignments * Correct variable $userId not $userid in save function * Update administrator/components/com_templates/src/Model/StyleModel.php Co-authored-by: SharkyKZ <sharkykz@gmail.com> * Update administrator/components/com_templates/src/Model/StyleModel.php Co-authored-by: SharkyKZ <sharkykz@gmail.com> * Update administrator/components/com_templates/src/Model/StyleModel.php Co-authored-by: Richard Fath <richard67@users.noreply.github.com> * Update administrator/components/com_templates/src/Model/StyleModel.php Co-authored-by: Richard Fath <richard67@users.noreply.github.com> Co-authored-by: SharkyKZ <sharkykz@gmail.com> Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
Steps to reproduce the issue
Save a template style with menu assignments (4.0-beta-3-dev)
Expected result
Template style saved with menu assignments
Actual result
None of the menu assignments are saved
System information (as much as possible)
Joomla 4.0-beta-3-dev - Linux - PHP 7.4.8 - MySql 5.7.28
Additional comments
In the Administrator StyleModel.php function Save, replace in the 2 queries :
by something like :
I think maybe there is something wrong in the query with
whereInphpnulland the mysql checkIS NULL= NULLorIN (NULL)may not work sometimes->where($db->quoteName('checked_out') . '= NULL')=> not work->whereIn($db->quoteName('checked_out'), [null])=> not work