• Resolved Alain Cloet

    (@alaincloet)


    Dear all,

    For compatibility with PolyLang, I tried to switch to Advanced Layout mode, but when saving, the page crashes (HTTP 500).
    Is this because the free version doesn’t allow Advanced Layout mode?

    Or could it be because I still have some short codes to the catalog still in use?

    The error mentions that a mail is sent to the administrator, but nothing is received.

    TIA,
    Alain

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Alain Cloet

    (@alaincloet)

    It seems to be a general issue when I try to save the options from the catalog … So not related to “Advanced” or not
    Initially I was able to set some parameters, but I can’t change now

    Thread Starter Alain Cloet

    (@alaincloet)

    I made a reset of the options (Reset Catalog Settings), and now I can save again (or at least, I could save once, no need to keep trying :D)

    Plugin Author ndre

    (@ndre)

    Hi @alaincloet,

    Thank you for reporting this issue.

    Would you please check the WordPress error log for the error? Or your administrator account email address for the error message?

    Thread Starter Alain Cloet

    (@alaincloet)

    Hi @ndre ,

    I’m sorry for the late reply, but I didn’t find the error_log, probably as it is on a shared server, php-error log wasn’t active and couldn’t be changed (and I didn’t have a local copy running yet :)). However, I found the option to set debugging, so I got the error on screen.

    It looks like the error is caused by PolyLang, not your plugin.. or maybe a conflict between both..

    Fatal error: Uncaught TypeError: Illegal offset type in isset or empty in /var/www/vhosts/szilviart.be/httpdocs/wp-includes/pomo/translations.php:135

    Stack trace: #0 /var/www/vhosts/szilviart.be/httpdocs/wp-includes/pomo/translations.php(154): Translations->translate_entry(Object(Translation_Entry)) #1 /var/www/vhosts/szilviart.be/httpdocs/wp-content/plugins/polylang/include/translate-option.php(382): Translations->translate(Array) #2 /var/www/vhosts/szilviart.be/httpdocs/wp-content/plugins/polylang/include/translate-option.php(279): PLL_Translate_Option->check_value_recursive(Array, NULL, Array, Object(PLL_MO)) #3 /var/www/vhosts/szilviart.be/httpdocs/wp-includes/class-wp-hook.php(324): PLL_Translate_Option->pre_update_option(NULL, Array, 'product_currenc…') #4 /var/www/vhosts/szilviart.be/httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/szilviart.be/httpdocs/wp-includes/option.php(776): apply_filters('pre_update_opti…', NULL, Array, 'product_currenc…') #6 /var/www/vhosts/szilviart.be/httpdocs/wp-admin/options.php(340): update_option('product_currenc…', NULL) #7 {main} thrown in /var/www/vhosts/szilviart.be/httpdocs/wp-includes/pomo/translations.php on line 135

    When I modified the mentioned line “pomo/translations.php:135” from
    return isset( $this->entries[ $key ] ) ? $this->entries[ $key ] : false;

    to
    return ( !is_array($key) && isset( $this->entries[ $key ] ) ? $this->entries[ $key ] : false);

    The next error became
    Fatal error: Uncaught TypeError: Illegal offset type in /var/www/vhosts/szilviart.be/httpdocs/wp-content/plugins/polylang/include/translate-option.php:385

    From the block below, line 385 is the one which sets update_strings

        } elseif ( $old_values !== $values ) {
            if ( $mo->translate( $old_values ) === $values ) {
                $values = $old_values; // Prevents updating the value to its translation.
            } else {
                $this->updated_strings[ $old_values ] = $values; // Stores the updated strings.
            }
        }

    For this, I changed the ‘else’ from line 384 to
    } elseif(!is_array($old_values)) {

    Now the “save” works, but of course might have some unexpected behaviour .. and new crashes when an update comes on the translation.

    BR,

    Alain

    Plugin Author impleCode

    (@implecode)

    Hi @alaincloet,

    Thank you for the detailed description. It looks like an issue with Polylang.

    I tried to reproduce this issue but it doesn’t trigger for me. It looks like it is connected with the Custom Currency Symbol translation.

    What do you have set for Custom Currency Symbol in the catalog general settings?

    What are the translations for the custom_symbol in Languages > Translations?

    Thread Starter Alain Cloet

    (@alaincloet)

    Hi, I don’t find any setting regarding the Currency Symbol. Where should it be located? I did look in the general settings and also in the translations …
    But I didn’t list any prices, so maybe this causes this (I don’t even see where I could add them, but I might have deselected such parameter somewhere)?

    Plugin Author ndre

    (@ndre)

    Can you provide the sceeenshot of the catalog general settings?

    Thread Starter Alain Cloet

    (@alaincloet)

    Hi,

    I hope the above is clear enough (or better, that you can see it this way :))

    BR,
    Alain

    • This reply was modified 4 months, 2 weeks ago by Alain Cloet.
    Plugin Author ndre

    (@ndre)

    Hi @alaincloet,

    Unfortunately I cannot see any image…

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.