• Resolved extremecarver

    (@extremecarver)


    When I activate PHP 8.0 or PHP 8.1 i loose the wordpress adming bar – plus my theme onresize goes down to minimum width independant of actual browser viewport width.

    In console I get an error on this line:
    <body data-cmplz=1 class=”home blog logged-in admin-bar no-customize-support mob-menu-slideout-over” onresize=”OnResize Document()”>

    Plus an error 500 – on the first line (which doesn’t tell much useful).

    I think there is some bug with onresize – but it could be also based on Atahualpa theme which is very old. However it only happens if I activate both Atahualpa theme and Complianz.

    Using PHP 7.4 all is fine.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @extremecarver,

    https://wordpress.org/themes/atahualpa/

    This one I presume? As they haven’t updated in the last 2 years I would expect there not compatible with PHP 8+.

    I will install the theme and see if there’s a quick fix. regards Aert

    Thread Starter extremecarver

    (@extremecarver)

    I think the only up to date version is on the forum:
    http://forum.bytesforall.com/showthread.php?t=24089

    I uploaded a working version (fixed for PHP 8.0) here for you to try:
    https://openmtbmap.org//wp-content/uploads/atahualpa.zip

    (this version has one } removed which is wrongly in the version of the thread above. Otherwise identical.

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @extremecarver,

    It’s live here PHP 8.1, but with the latest WP version. Which version are you running?

    https://g-uprising-leti.instawp.xyz/

    Thread Starter extremecarver

    (@extremecarver)

    Sorry it just took me ages finding the culprit. There is a folder called languages under wp-content – and as soon as wordpress has created the .mo file for the currently activated language with qtranslate – the crash starts:

    i.e.
    /wp-content/languages/de_DE.mo
    /wp-content/languages/en_US.mo
    /wp-content/languages/it_IT.mo

    The bug does not happen with the default wordpress theme however. If you delete a single language – like en_US.mo then activate English – the english page will load fine.

    I still don’t know if this error is related to my theme, to qtranslate XT or to Complianz (as deactivating any of those 3 will solve it obviously).

    Maybe something non 8.0 compatible ends up in those file?
    I will upload my broken ones for testing – as I think they get somehow dynamically created? https://openmtbmap.org/languages.zip

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    These are wp core translation files, which are not dynamically generated, but downloaded by WordPress if you enable a language.

    I don’t expect the actual cause of your issue to be in those files.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Is there a php error in the debug log?

    Thread Starter extremecarver

    (@extremecarver)

    Which debug log? I just know it happens without any other plugins active – as soon as I have the language .mo files restored via “update translations”.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    If you install the plugin “wp debugging” you get a debug log in the admin bar. This might help find the cause.

    Thread Starter extremecarver

    (@extremecarver)

    >I get a warning that may be meaningful:
    [18-Sep-2022 21:26:09 UTC] PHP Warning Illegal offset type in isset or empty in /var/www/openmtbmap.org/htdocs/wp-includes/pomo/translations.php on line 91

    And if I activate the right language this goes to (notice theme-coder is a name for the child-theme Atahualpa as I did some adatpions which don’t matte in this case however):

    [18-Sep-2022 21:37:26 UTC] PHP Fatal error Uncaught TypeError: Illegal offset type in isset or empty in /var/www/openmtbmap.org/htdocs/wp-includes/pomo/translations.php:91
    
    Stack trace:
    
    #0 /var/www/openmtbmap.org/htdocs/wp-includes/pomo/translations.php(106): Translations->translate_entry(Object(Translation_Entry))
    #1 /var/www/openmtbmap.org/htdocs/wp-includes/l10n.php(186): Translations->translate(Array)
    #2 /var/www/openmtbmap.org/htdocs/wp-includes/l10n.php(297): translate(Array, 'default')
    #3 /var/www/openmtbmap.org/htdocs/wp-content/themes/theme-coder/functions.php(81): __(Array)
    #4 /var/www/openmtbmap.org/htdocs/wp-includes/class-wp-hook.php(309): filter_data_complianz(Array)
    #5 /var/www/openmtbmap.org/htdocs/wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array)
    #6 /var/www/openmtbmap.org/htdocs/wp-content/plugins/complianz-gdpr-master/cookiebanner/class-cookiebanner.php(1046): apply_filters('cmplz_cookieban...', Array, Object(CMPLZ_COOKIEBANNER))
    #7 /var/www/openmtbmap.org/htdocs/wp-content/plugins/complianz-gdpr-master/cookie/class-cookie-admin.php(1835): CMPLZ_COOKIEBANNER->get_html_settings()
    #8 /var/www/openmtbmap.org/htdocs/wp-includes/class-wp-hook.php(307): cmplz_cookie_admin->cookiebanner_html('')
    #9 /var/www/openmtbmap.org/htdocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #10 /var/www/openmtbmap.org/htdocs/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
    #11 /var/www/openmtbmap.org/htdocs/wp-includes/general-template.php(3058): do_action('wp_footer')
    #12 /var/www/openmtbmap.org/htdocs/wp-content/themes/atahualpa/footer.php(110): wp_footer()
    #13 /var/www/openmtbmap.org/htdocs/wp-includes/template.php(770): require_once('/var/www/openmt...')
    #14 /var/www/openmtbmap.org/htdocs/wp-includes/template.php(716): load_template('/var/www/openmt...', true, Array)
    #15 /var/www/openmtbmap.org/htdocs/wp-includes/general-template.php(92): locate_template(Array, true, true, Array)
    #16 /var/www/openmtbmap.org/htdocs/wp-content/themes/atahualpa/index.php(66): get_footer()
    #17 /var/www/openmtbmap.org/htdocs/wp-includes/template-loader.php(106): include('/var/www/openmt...')
    #18 /var/www/openmtbmap.org/htdocs/wp-blog-header.php(19): require_once('/var/www/openmt...')
    #19 /var/www/openmtbmap.org/htdocs/index.php(17): require('/var/www/openmt...')
    #20 {main}
    thrown in /var/www/openmtbmap.org/htdocs/wp-includes/pomo/translations.php on line 91
    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Are you using this branch?
    https://github.com/Really-Simple-Plugins/complianz-gdpr/pull/377

    It includes a fix for qtranslate.

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    The above branch fixes compatibility between Complianz and qtranslate, but I notice in your logs an error caused by a function ‘filter_data_complianz’ which is called by the theme-coder child theme. I think there’s an issue in this function.

    Thread Starter extremecarver

    (@extremecarver)

    Oh true, thank you. Yeah I had forgotten that I added some stuff to functions.php of my child theme according to outdated tutorials on github page of qtranslate. That caused the crashes with PHP 8.0 and 8.1 now.

    Yes and I’m using the branch – now it works perfect (even with PHP 8.1). Hopefully after merge qtranslate will keep working without any fixes in future updates…

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @extremecarver,

    Thank you for confirming the solution, glad to hear about this.

    I’ll mark the thread as resolved, the fix/improvement will be included in our testing routines and released in an upcoming update of the plugin. Keep an eye on the plugin changelog for a mention of this addition.

    Kind regards,
    Jarno

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Complianz not working with Atahualpa Theme on PHP 8.0 or later’ is closed to new replies.