• Hi Weglot team!

    We use Weglot on a client production site and ran into a fatal error today on the WordPress plugins screen. From what we could trace, it involves the psr/cache library that Weglot bundles and another plugin on the same site that bundles a newer version of the same library. They both live in the global Psr\Cache namespace, so PHP ended up with the older interface in memory when the other plugin tried to load its modern class, and the signatures no longer matched.

    Wanted to share this in case it’s something you’d want to look at. We can send over more details, error trace, or the list of plugins involved if any of that helps.

    Thanks for keeping the plugin going.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Edson Galina Fortes

    (@glx77)

    Hi,

    Thanks for the detailed report — really appreciate you taking the time to trace it down.

    To give you some context on the library version: Weglot still targets PHP 7.4 as its minimum requirement, and psr/cache 2.0+ dropped PHP 7 support
    entirely. Jumping to a newer version would break compatibility for a significant portion of our users, so we’re intentionally staying on 1.0 for now.

    As a short-term workaround while we investigate, we have a filter called weglot/skip_contexts that lets you tell Weglot to skip its initialisation in
    specific admin screens or pages. If the fatal happens on a predictable screen, that can at least keep the plugins screen stable:

    add_filter( ‘weglot/skip_contexts’, function( $contexts ) {
    $contexts[‘screens’][] = ‘plugins’; // example: WP admin plugins screen
    return $contexts;
    } );

    That said, to properly reproduce and test a fix on our end, could you share:

    • The name of the conflicting plugin (and ideally its version)?
    • The exact screen or action that triggers the fatal (plugins page, a specific admin page, frontend, etc.)?
    • The full error trace if you have it? With that we can set up the same environment locally and look at the best path forward.

      Thanks again!
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.