News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

VM 3.8.8.10472: Missing format specifier at end of string - product card in BE

Started by stawebnice, January 27, 2022, 16:34:03 PM

Previous topic - Next topic

stawebnice

Hi,

I just tested VM 3.8.8.10472 on Joomla 3.10.5 and PHP 8 and even though front-end does not show any errors, when I try to open product card in administration, I get this error:
Missing format specifier at end of string

Is it a bug or is this version not compatible with PHP 8?

Thanks!

Petra

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Jumbo!

It is a PHP 8 related issue. You have to wait until VirtueMart becomes fully compatible with PHP 8.

Downgrade to PHP 7, which should resolve the issue.

pinochico

Quote from: Jumbo! on January 27, 2022, 17:07:17 PM
It is a PHP 8 related issue. You have to wait until VirtueMart becomes fully compatible with PHP 8.

Downgrade to PHP 7, which should resolve the issue.

Yes, the problem is reported on the any forum:
https://forum.virtuemart.de/thread/3990-fehlermeldung-wenn-man-ein-produkt-aufrufen-ändern-möchte/
https://forum.joomla.de/thread/13216-probleme-mit-virtuemart/
https://forum.joomla.org/viewtopic.php?t=985113

but not fixed in last version (com_virtuemart.3.8.9.10583_package_or_extract.zip) too.

We are waiting ;D not downgrade
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

stawebnice

@jorgen switching to English on Czech site is not a solution.
Yes, downgrading to 7.4 solves the issue.  But still looking forward to the full compatibility with PHP 8. Because it looks like all my other extensions are compatible... so I can't wait ;)

Jörgen

@stawebnice

I did not mean to switch to english permanently, problems with translations have been known to create issues. And switching to english in back end is a very fast test to rule out language issues. This time it seems to be a an PHP 8 issue.

Quote from the Joomla forum:
QuoteAnyhow it is most likely a mistake in the "other" software and not in VM. VM works just fine...Are you using PHP 8 if so set back to PHP 7.4 in your hosting control panel. PHP8 is not yet Stable

Jörgen @ Kreatuv Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

stawebnice

Yes, from front-end it looks fine, so if we wouldn't need to update a product, we would hardly notice it...

Milbo

The reason is the missing $ in the placeholders.
%s, %1s, %d, and so on must become %1$s, respectivly %1$d. and of course the given number must preserved. Just the "old" rule, php8 is more restrictiv than php7
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dandyse


StefanSTS

Quote from: dandyse on September 20, 2022, 13:22:13 PM
Ehm ... no ... it must be $%1s NOT %1$s.

Really? The PHP docs say it the same way Milbo says.
You might want to quote a reliable source.

Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Milbo

It is really freaky topic, this guys say the % must go completly?

https://wordpress.org/support/topic/uncaught-valueerror-missing-format-specifier-at-end-of-string/

At least they suffer the same problem. But I really wonder how joomla does it, why they do not have that hassle. So we have not solved all mysteries here
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

pico71

I Have the same error In MY JOOMLA\Virtuemart installation
JOOMLA 3.10.11
VM: 4.0.12

Editing a product from backend give me this error:
"Missing format specifier at end of string"

Looking into the VM folder language (Administrator and Component) - I have only the gb-EN LANGuages (even if my JOOMLA site is ITALIAN\ENGLISH).
Whick file have I check\correct to solve this issue ?
P.

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

razor7

MGS Creativa - VirtueMart Payment Plugin Experts
http://www.mgscreativa.com

Take a look at our downloads section for VirtueMart payment plugins and mouch more!
http://www.mgscreativa.com/en/online-store

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/