• I have thousands of thousands warning lines inside the error log files from this plugin.

    [18-Feb-2026 08:43:23 UTC] PHP Warning:  Undefined array key "elementor_preview" in /home/***redacted***/public_html/wp-content/plugins/connect-polylang-elementor/includes/elementor-assets.php on line 52

    Plugin versions:

    • Elementor (free only), Version 3.35.57
    • Polylang (free only), Version 3.7.7
    • Connect Polylang for Elementor, Version 2.5.5
Viewing 1 replies (of 1 total)
  • Plugin Contributor CoolHappy

    (@narinder-singh)

    Hi,
    Thank you for reporting this issue.
    The warning you’re seeing: Undefined array key ‘elementor_preview’ is caused by the plugin accessing the elementor_preview value from the URL without properly ensuring the key exists first. In PHP 8+, accessing a non-existent array key triggers a warning, which is why your error logs are filling up with thousands of entries.
    To resolve this, please update the following file:
    File path:
    /connect-polylang-elementor/includes/elementor-assets.php
    (around line 57)
    Replace this line:

    $is_preview = isset( $_GET[‘elementor_preview’] ) && ! empty( sanitize_key( wp_unslash( $_GET[‘elementor_preview’] ) ) );

    With the following code:

    $preview_val = isset( $_GET[‘elementor_preview’] ) ? sanitize_key( wp_unslash( $_GET[‘elementor_preview’] ) ) : ”; $is_preview = $preview_val !== ”;

    This change ensures that $_GET['elementor_preview'] is only accessed when it actually exists, preventing PHP 8 from generating the “Undefined array key” warning. There is no change in functionality — this is strictly a compatibility fix and will stop the excessive log entries.
    Please refer to the screenshot here for reference:
    https://prnt.sc/HSTOcEUF9HzX
    After applying this change, the warnings should stop immediately.
    We will include these changes in upcoming updates.
    Let us know if you need any assistance.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.