Bad translation triggers a fatal error
-
Hello,
In the function “kbs_setup_kbs_ticket_tag_taxonomy()” you have this line of code:
'search_items' => sprintf( esc_html__( 'Search %s Tags', 'kb-support' ), kbs_get_ticket_label_singular() ),
When you change the language to Spanish in the backend, that line of code becomes:
sprintf('Buscar Etiqueta…', 'Ticket')
It triggers a fatal error because the Spanish translation of ‘Search %s Tags’ misses the %s.
I suggest you be sure all the translations have the format specifier required by the function sprintf.
In my case, it triggers a fatal error in the backend because of a bad translation.
Here what I find in the debug.log file:
[01-Jan-2023 18:09:30 UTC] PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /Users/josemortellaro/Sites/plugins/wp-content/plugins/kb-support/includes/post-taxonomies.php:76
And the backend shows a white screen of death. So the issue is serius.
In my case I have solved it, this thread is just for making you aware of this issue.I hope it helps.
Have a great day!
Jose
- The topic ‘Bad translation triggers a fatal error’ is closed to new replies.