The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
After upgrading a client's website to PHP 8.1 this error appears in the screen when accessing a Portuguese (pt-pt) translated page:
Fatal error: Uncaught ValueError: Missing format specifier at end of string in /var/www/html/wp-content/plugins/pods/classes/PodsInit.php on line 2006
ValueError: Missing format specifier at end of string in /var/www/html/wp-content/plugins/pods/classes/PodsInit.php on line 2006
After the call stack list, PHP displays the last function call which reveals the the cause of the error: the translation string is missing the "s" after the % symbol:
The error can be fixed by downloading the /wp-content/languages/plugins/pods-pt_PT.po and associated .mo files and manually edit it (in my case using POEdit) to change the line 918 from:
Description
After upgrading a client's website to PHP 8.1 this error appears in the screen when accessing a Portuguese (pt-pt) translated page:
After the call stack list, PHP displays the last function call which reveals the the cause of the error: the translation string is missing the "s" after the % symbol:
[sprintf](http://www.php.net/function.sprintf)( $format = 'Todos os %', $values = 'Pod Templates' )
Version
3.2.4
Testing Instructions
No response
Screenshots / Screencast
Possible Workaround
The error can be fixed by downloading the
/wp-content/languages/plugins/pods-pt_PT.po
and associated.mo
files and manually edit it (in my case using POEdit) to change the line 918 from:msgstr "Todos os %"
to:
msgstr "Todos os %s"
Then uploading the file again.
Site Health Information
No response
Pods Package
No response