soflyy / breakdance-bugs

Bug reports from Breakdance users.
42 stars 6 forks source link

TranslatePress frontend editor not loading on a single custom post type template #670

Open adkoen opened 1 year ago

adkoen commented 1 year ago

The frontend editor for TranslatePress is not loading on a Breakdance template for a single custom post type. I made a very basic custom post type and created a Breakdance template for it. It only displays post title and post content. The TranslatePress editor does not load.

https://share.webmatic.be/mXubvk1e

wtfz commented 4 months ago

I found a workaround to enable the visual editor for TranslatePress.

// wp-content/plugins/breakdance/plugin/actions_filters/template_include.php (line 35)

function template_include($file_to_include)
{
    // initially check if TranslatePress template is loaded
    if (strpos($file_to_include, 'translation-manager.php')) {
        return $file_to_include;
    }

    // WP checks if it's robots or....
}
adkoen commented 4 months ago

Thanks! Maybe someone from Breakdance could check in on this?

I found a workaround to enable the visual editor for TranslatePress.

// wp-content/plugins/breakdance/plugin/actions_filters/template_include.php (line 35)

function template_include($file_to_include)
{
    // initially check if TranslatePress template is loaded
    if (strpos($file_to_include, 'translation-manager.php')) {
        return $file_to_include;
    }

    // WP checks if it's robots or....
}

Maybe someone from Breakdance could check in on this?