Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter ultcrt

    (@ultcrt)

    After some digging, I believe there is a translation bug in the localization file astra-zh_CN.po at line 5378:

    #: inc/core/class-astra-theme-options.php:188
    msgid "Search Results for:"
    msgstr "“%s”的搜索结果"

    As you can see, the translated version has %s in it while the English version does not, which makes astra option section-search-page-title-custom-title has one more %s in translated version than English version , and this is why the error occurs.

    For now, I fix the problem using Astra child theme to avoid changing Astra main theme. Just put following code into functions.php:

    add_filter( 'astra_theme_defaults', 'fix_search_title' ); 
    function fix_search_title($defaults) {
    	$defaults['section-search-page-title-custom-title'] = '<Search title in your language>:';
       return $defaults;
    }

    Hope you guys could fix this translation problem in the future.

    Thank you

    • This reply was modified 11 months, 2 weeks ago by ultcrt.
    • This reply was modified 11 months, 2 weeks ago by ultcrt.
    Thread Starter ultcrt

    (@ultcrt)

    Sorry for my late reply.

    I am using PHP8.3. And I have disable all plugins. But I think PHP version and plugins are not responsible for the problem, because I recently found out the site language is the cause of the problem. If I set language back to English, the problem disappear. But if I set it to Chinese for example, the problem shows up.

    Thread Starter ultcrt

    (@ultcrt)

    Thank you for your reply.

    I am using a theme called Astra, and enabling its Reveal Effect feature at post archive customize menu. But I think this feature could be a paid feature of Astra, it might be a problem for you guys to recreate the problem.

    Thread Starter ultcrt

    (@ultcrt)

    Thanks for reply.

    The only thing I did is adding a search element in header, and use it to search something, then the searching page shows fatal error.

Viewing 4 replies - 1 through 4 (of 4 total)