• Resolved floh79

    (@floh79)


    Hello,

    my customer told me today they have an issue with loco-translate. If we disable the loco-translate plugin, then the website works fine. With enabled plugin, we get a critical error message:

    `Fatal error: Uncaught ValueError: Missing format specifier at end of string in /customers/4/5/b/domain.de/httpd.www/wp-content/plugins/woocommerce/includes/class-wc-post-types.php:232 Stack trace: #0 /customers/4/5/b/domain.de/httpd.www/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(232): sprintf(‘Alle %’, ‘Ausf\xC3\xBChrung’) #1 /customers/4/5/b/domain.de/httpd.www/wp-includes/class-wp-hook.php(303): WC_Post_Types::register_taxonomies(”) #2 /customers/4/5/b/domain.de/httpd.www/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #3 /customers/4/5/b/domain.de/httpd.www/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #4 /customers/4/5/b/domain.de/httpd.www/wp-settings.php(578): do_action(‘init’) #5 /customers/4/5/b/domain.de/httpd.www/wp-config.php(116): require_once(‘/customers/4/5/…’) #6 /customers/4/5/b/domain.de/httpd.www/wp-load.php(50): require_once(‘/customers/4/5/…’) #7 /customers/4/5/b/domain.de/httpd.www/wp-admin/admin.php(34): require_once(‘/customers/4/5/…’) #8 /customers/4/5/b/domain.de/httpd.www/wp-admin/plugins.php(10): require_once(‘/customers/4/5/…’) #9 {main} thrown in /customers/4/5/b/domain.de/httpd.www/wp-content/plugins/woocommerce/includes/class-wc-post-types.php on line 232

    The support of hoster told me to ask you for help because they think its a compatibility issue between the plugins. So what can I do?

    Current Version WordPress: 5.8.2
    Current Version Loco-Translate: 2.5.5
    Current Version Woocommerce: 5.9.0

    Let me know if some information are missing which I should provide.

    Best regards
    Floh

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tim W

    (@timwhitlock)

    This is not an error with my plugin. It is an error with the formatted translation text that has been entered by a person. This is not a problem I provide support for. Read the WordPress handbook on translating (in this case) plural forms: https://developer.www.ads-software.com/apis/handbook/internationalization/internationalization-guidelines/#basic-pluralization

    Thread Starter floh79

    (@floh79)

    Hello, thank you for your quick reply.

    I’ll ask my customer what they did last time since they didn’t tell me anything about working with Loco Translate recently. I’m very sure they didn’t change the translation in code base since they don’t have any access to ssh/terminal* but wp-admin since they’re just sellers without any knowledge about coding. So no printf-coding happened as described in doc, you mentioned.
    *) I’m the only one who has access to ssh/terminal.

    This is the only place where they work on translations, see following screenshot. So could translations with plurals be created there (by them)?
    https://ps.w.org/loco-translate/assets/screenshot-1.png?rev=2310739

    I asume I have to fix the .po file, since we cannot access wp-admin while loco-translate is activated, am I right?

    Best regards
    Floh

    Plugin Author Tim W

    (@timwhitlock)

    This is the only place where they work on translations, see following screenshot. So could translations with plurals be created there (by them)?

    Yes. Anyone with access to edit translation files can break your website by entering bad formatting. This appears to be what has happened.

    I asume I have to fix the .po file, since we cannot access wp-admin while loco-translate is activated, am I right?

    Why can’t you access Loco Translate? Your error occurs when the translation is displayed by WooCommerce. It would not need to be displayed when accessing the translation editor. If for some reason it does, then I suggest you switch your site to English, fix the PO file, then switch it back again.

    Thread Starter floh79

    (@floh79)

    I cannot access anything on WordPress-Website, neither the webpages nor the wp-admin because it shows blank page with critical error (I pasted in initial post). No matter which page I try.

    So I have to deactivate loco-translate (by accessing ssh which is the only way) in order to be able to access wp-admin pages (and the frontend).

    I’ll try with browser set to english if I can access wp-admin then…

    Best regards
    Floh

    • This reply was modified 2 years, 11 months ago by floh79.
    Plugin Author Tim W

    (@timwhitlock)

    Probably easier to use SSH to delete the MO file which is being read by WordPress. Leave the PO file alone. Then – once you can access again – go in and fix the PO. Saving it will recreate the MO.

    Thread Starter floh79

    (@floh79)

    Hello Tim,

    just fixed the po-file. Now it works. Weird: My customer told me they didn’t do anything. Anyway it works fine and thank you very much!

    Best regards
    Floh

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘critical error with Woocommerce’ is closed to new replies.