SEBLOD
SEBLOD copied to clipboard
Seblod 4 / J4: $uri no more usable in "SQL" fields Search Query and SQL pack
In Seblod 3 on Joomla 3, I have an extremely wide use of
$uri->get('lang')
to retrieve current language in various SQL fields (Search Query, SQL Query) and use it to complete the query.
Now in Seblod 4 on Joomla 4 this is no more possible:
- nothing is returned using that expression
- [lang] variable is not supported (it was not already in Seblod 3). Interestingly, if disabling URL rewrite so having the ugly native URLs (?option=com_cck...), it is working again, as the internal URL before rewriting is no more accessible to Seblod fields. This is a blocking issue to go to Seblod 4 with a multilingual site: is it something to be "patched" in Seblod or is there an alternative way in those fields to retrieve current language and use it for completing the SQL query?
thanks
Giuse
Investigating Seblod code, I found that instead of (no more working with SEF enabled)
$uri->get('lang')
it is possible to use
$lang->getTag()
I do not close the issue since in Seblod 3 on Joomla 3, the full $uri was available also with SEF enabled, to let Octopoos give a feedback on this. For example also
Live Value = Uri/Variable
using "lang" as variable does not work anymore.