Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 1015

Joomla! 4.x Coding • Re: is quoteName() different in 4.0 to 3.10??

$
0
0
Hi Peter,

My configuration.php looks fine:

Code:

public $dbprefix = 'e4wbo_';
and everything works if I use replacePrefix, but with quoteName alone I don't get any prefix replacement.

I've done a virgin install of Joomla 4.4.9, then installed a really basic component. If I put this code in src/Models/FoldersModel.php:

Code:

protected function getListQuery() {           $db = $this->getDatabase();        throw new \Exception('found ' . $db->quoteName('#__com_conlucra_utterances', 'u'), 500);}
I get:

Code:

An error has occurred.500 found `#__com_conlucra_utterances` AS `u`
If I change it to:

Code:

throw new \Exception('found ' . $db->quoteName($db->replacePrefix('#__com_conlucra_utterances'), 'u'), 500);
I get the correct translation:

Code:

An error has occurred.500 found `q78ty_com_conlucra_utterances` AS `u`

Statistics: Posted by david0058 — Sat Dec 21, 2024 12:16 pm



Viewing all articles
Browse latest Browse all 1015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>