• Resolved ranierbonnici

    (@ranierbonnici)


    This is a great plugin but I’m encountering an issue similar to that reported by others. When I activate ReactPress it breaks my website. The website works fine when ReactPress is deactivated.

    What I’ve tried:
    – Different themes, including ones that don’t use Elementor
    – A fresh install of WordPress, without ever installing Elementor

    Upon enabling debugging (and ReactPress), the following errors occur.

    Warning: include(template-home.php): failed to open stream: No such file or directory in /home/tepbpumy/public_html/prints_wp/wp-includes/template-loader.php on line 106

    Warning: include(): Failed opening ‘template-home.php’ for inclusion (include_path=’.:/opt/cpanel/ea-php74/root/usr/share/pear’) in /home/tepbpumy/public_html/prints_wp/wp-includes/template-loader.php on line 106

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author rockiger

    (@rockiger)

    Do you have any other plugins installed, that mess with template loaders?

    I could also be it is an issue with bluehost. I can’t tell to be honest.

    Thread Starter ranierbonnici

    (@ranierbonnici)

    I deactivated all plugins and still encountered the problem. However, I am now (partly) understanding what’s happening. The error occurs in the WordPress code responsible for loading the page template (template-loader.php).

    $template = apply_filters( 'template_include', $template );
    	if ( $template ) {
    		include $template;

    For some reason, with ReactPress activated, the code uses a relative path to try to load the template. So instead of $template having a value of ‘/home/tepbpumy/public_html/prints_wp/wp-content/themes/artday/template-home.php’, it will have a value of ‘template-home.php’. Of course, the file does not exist in the same location as template-loader.php, and hence page loading fails.

    I managed to make a dirty fix as follows, but would appreciate any feedback if this detail rings a bell to something in the plugin code that might be causing this.

    $template = apply_filters( 'template_include', $template );
    	// FIX START
    	$prefix = '/home/tepbpumy/public_html/prints_wp/wp-content/themes/artday/';
    	if (strpos($template,'reactpress') == false) {
            $template = $prefix.$template;
        }
    	// FIX END
    	if ( $template ) {
    		include $template;
    Plugin Author rockiger

    (@rockiger)

    Hi @ranierbonnici,

    cool that you managed to fix this. If it works for you, great!

    I think the whole template filter is a bit dirty and doesn’t work on certain configurations. I will look into it this weekend (as long as my corona shot on friday allows it).

    Plugin Author rockiger

    (@rockiger)

    Hello @ranierbonnici,

    I released a new version of ReactPress that should fix your issues. Could you please check?

    Thread Starter ranierbonnici

    (@ranierbonnici)

    I confirm that it works @rockiger. Thank you so much for your work.

    hi threre, i still have this issue, brand new install of wordpress and a download of the reactpreess app. any ideas? thanks

    • This reply was modified 3 years, 7 months ago by jjnash01.
    Plugin Author rockiger

    (@rockiger)

    @jjnash01 Do you have any other plugins installed?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘ReactPress breaks website’ is closed to new replies.