Dear all,
I've read this topic started on January 27, 2022 in which they advise to downgrade to php 7 as Virtuemart is not php 8 ready yet:
https://forum.virtuemart.net/index.php?topic=147821.msg527297;topicseen#msg527297
Nou is is january 2023 and i see the bug still existst?
I use the lates version of Virtuemart 4.012.10777 and Joomla 3.10.11
My serverhost is pushing me to use php 8! I tried, but i still get this error so i downgraded again to php 7 and problem was solved, but server host is not happy.
So when is this bug solved please and/or is there an other solution?
I hope to hear from you soon.
Kind regards
Renata Gravendijk
This was a language file issue. See https://forum.virtuemart.net/index.php?topic=147821.msg528625#msg528625 and check your language files for errors/updates.
thanks! I have updated all language files and now all is working in good order
( i thought while updating virtuemart, language files also were automaticly updated )
Thanks!
Kind regards
Renata
I Have the same error if I switch to PHP 8.1 (from 7.4)
Editing a product from admin side - for example - I have:
"Missing format specifier at end of string"
From frontend side - seems to works fine (but I have not tested everythings!)
BUT admin of virtuemart do not work, properly:
Is this a BUG ?
I have JOOMLA 3.10.11
Virtuemart 4.0.12
Reporetd by Tovio on the Joomla forum:
"Joomla 3.10.11 is not compatible with PHP 8.1, unless the level of error reporting in the Server tab of the Global Configuration is set to 'Simple' or 'None'. The recommended version of PHP for Joomla 3.10.11 is PHP 8.0, as you can see from the Technical Requirements for Joomla 3.x."
Check/update your language files. https://forum.virtuemart.net/index.php?topic=147821.msg528625#msg528625
I fixed that by commenting the lines 142 till 146 in /administrator/components/com_virtuemart/helpers/vmtext.php.
Or take the attached file unzip it and replace it to the path above get that fixed.
Dont know if this the right solution but fixed the problem and everything works like a charm!
Error can bypassed in virtuemart product edit page only by using this code at lines 142..146 in /administrator/components/com_virtuemart/helpers/vmtext.php.
$app = Joomla\CMS\Factory::getApplication();
if($app->input->get('view')!=='product'){
foreach($args as &$arg){
//vmdebug('my sprintf $arg',$arg);
$arg = self::$language->_($arg);
$arg = preg_replace('/\[\[%([0-9]+):[^\]]*\]\]/', '%\1$s', $arg);
}
}