Viewing 7 replies - 1 through 7 (of 7 total)
  • Hellow, i have this problem too.
    This problem on Sage versions from 9.0.6 and above and on WP different versions…
    Please, help. Thanks.

    • This reply was modified 4 years, 9 months ago by Andrew.
    Dragos

    (@dragosvrejiu)

    Hello,

    Were you able to use TranslatePress with Sage before ?

    When did this problem occur?

    Could you disable any caching plugin that you use and try again?

    Best regards,

    1. yes, i’m has used TranslatePress before Sage 9.0.6, wasn’t problems on all versions WP.
    2. this problem occur from Sage 9.0.6.
    3. all caching plugin disabled or not installed.

    help please((
    thanks.

    Same problem,

    1 – First time I was trying TranslatePress with the last sage version 9.0.9
    2 – The problem occurs when Sage is the active theme and I click the “Translate” button on the top admin bar. Then i see a blank page with the jQuery error in the console.
    3 – No cache plugins activated

    Thank you.

    • This reply was modified 4 years, 9 months ago by piweb.

    Revert this commit fix the issue.

    Big thanks)

    Or just bypass Sage blade template rendering for TranslatePress.

    
    /**
     * Render page using Blade
     */
    add_filter('template_include', function ($template) {
        if (strpos($template, 'translation-manager.php')) {
            return $template;
        }
        collect(['get_header', 'wp_head'])->each(function ($tag) {
            ob_start();
            do_action($tag);
            $output = ob_get_clean();
            remove_all_actions($tag);
            add_action($tag, function () use ($output) {
                echo $output;
            });
        });
        $data = collect(get_body_class())->reduce(function ($data, $class) use ($template) {
            return apply_filters("sage/template/{$class}/data", $data, $template);
        }, []);
        if ($template) {
            echo template($template, $data);
            return get_stylesheet_directory() . '/index.php';
        }
        return $template;
    }, PHP_INT_MAX);
    
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘TranslatePress and sage theme jQuery not defined’ is closed to new replies.