phpwordpresscustom-post-typefatal-errorwpml

Fatal Error WordPress Custom Post Type UI + WPML


After updating the wp-core, wpml plugin the other language link stopped working, after this, we contacted the support, and tried to roll back everything, and nothing helps We noticed the conflict between two plugins WPML and Custom Post Type UI.
We started getting this Fatal Error:

Fatal error: Uncaught ValueError: Missing format specifier at end of string in /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php:416 Stack trace: #0 /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php(416): sprintf('Nigdy wi\xC4\x99cej %', 'Case Study') #1 /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php(320): cptui_register_single_post_type(Array) #2 /home/itdspl/domains/itds.tld/public_html/wp-includes/class-wp-hook.php(308): cptui_create_custom_post_types('') #3 /home/itdspl/domains/itds.tld/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) #4 /home/itdspl/domains/itds.tld/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /home/itdspl/domains/itds.tld/public_html/wp-settings.php(617): do_action('init') #6 /home/itdspl/domains/itds.tld/public_html/wp-config.php(198): require_once('/home/itdspl/do...') #7 /home/itdspl/domains/itds.tld/public_html/wp-load.php(50): require_once('/home/itdspl/do...') #8 /home/itdspl/domains/itds.tld/public_html/wp-blog-header.php(13): require_once('/home/itdspl/do...') #9 /home/itdspl/domains/itds.tld/public_html/index.php(17): require('/home/itdspl/do...') #10 {main} thrown in /home/itdspl/domains/itds.tld/public_html/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 416

How it can be resolved? From where should I start or what to do?


Solution

  • What is an idiot minus to this question??? The problem was not in the plugin code!

    After days of searching for the issue and talking to support, I found an issue in String Translation for plugins.

    We haven't translated the Custom Post Type UI plugin, and we found that from 400 lines of strings only one was translated and it caused the issue.

    No %s Found >>>> Nie % 
    

    So this % at the end of the string was the main problem. Obviously that this sign "%" it's incorrect for the code to be in the end. I don't know how that happened since we didn't do this, but probably some issues after updating.

    So, be aware, that it could be a really small thing and actually not obvious to check. We searched really deeply since we couldn't see any fatal errors even with a debug mode.