Missing format specifier at end of string - is still a bug

Started by Renata, January 21, 2023, 20:55:06 PM

Previous topic - Next topic

Renata

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
Please visit my website https://responsivewebsitemaken.nl for all your graphic webdesign and Joomla websites.

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Renata

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
Please visit my website https://responsivewebsitemaken.nl for all your graphic webdesign and Joomla websites.

pico71

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

jenkinhill

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
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

niosme

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!
Fullstack Developer and Joomla Expert

niosme

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);
}
}
Fullstack Developer and Joomla Expert