User tests: Successful: Unsuccessful:
Pull Request for Issue # #25929 (comment).
Fix wrong group by in preset menu joomla.xml
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_menus |
Labels |
Added:
?
|
LOL. Does it solve Postgres?
no unfortunately.... this is only a macroscopic one
My modification was to not use l.image
but l.lang_code
in the sql_select
.
So, shall it also be modified in the sql_group
?
yes this is wrong from 3.x https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_menus/presets/joomla.xml#L233
where we use sql_group="a.id, m.language, l.image"
but the
a.id
is not in the select list of fields
I mean, shall we not have also
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
instead of
sql_group="a.id, a.title, a.menutype, m.language, l.image"
as we do not use l.image
anymore.
yes, my bad, you are right
At looking at @Hackwar error here:
#25929 (comment)
and if I understand German OK, It looks like this could be the solution to the Posgres issue...
Please do it for the other presets too and test in Posgres
Now, can you check Postgres?
select a.id,a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon
from my4_menu_types AS a
left join my4_menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN my4_languages AS l ON l.lang_code = m.language
where a.client_id = 0
group by a.id,a.title, a.menutype, m.language, l.lang_code
order by a.id DESC
currently i'm only able to test on postgresql console , and the resulting query is working now....
still not able to save an admin menu, but this is just another issue
I have tested this item
Great!
I have tested this item
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-08-20 08:21:11 |
Closed_By | ⇒ | infograf768 |
Thanks!
@alikon
This PR is OK for multilingual icons. I see no difference with sqli. Does it solve Postgres?
I suggest though, as I also modified the other 2 presets containing that code, to modify also modern.xml and menus.xml