bassjobsen / woocommerce-twitterbootstrap

This plugin wraps your Woocommerce views in the Twitter's Bootstrap Grid. Makes your views full responsive. No changes to your theme or other plugins needed.
85 stars 34 forks source link

Fatal Error #16

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hello, I can't activate the extension : a message says it created a fatal error :+1: Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:\UwAmp\www\child-themel\wp-content\plugins\woocommerce-twitterbootstrap\woocommerce-twitterbootstrap.php on line 419 I use the child theme.

bassjobsen commented 10 years ago

Hi,

At the moment i can't reproduce your error. Which version of woocommerce do you use? I expect C:\UwAmp\www\child-themel\ contains a normal wordpress installation?

Thanks for posting your issue.

ghost commented 10 years ago

It is woocomerce version 2.0.20 . I installed last WP version (3.8.1), and last version of JBST. How can I help ? Do you wish a login to a replication of the installation?

bassjobsen commented 10 years ago

My test enviroment is the same. I run on linux and you use windows(?) maybe that make the difference.

Will it be possible to edit files (to debug) with such login?

The error seems to be triggerd by this line: if(0 == ($woocommerce_loop['loop'] % 4)){?><div class="clearfix visible-sm"></div><?php }

Before this line a template is include:

if(!file_exists( $template = get_stylesheet_directory() . '/woocommerce-twitterbootstrap/'.$template.'.php' ))
{
                 $template = WP_PLUGIN_DIR.'/'.str_replace( basename( __FILE__), "", plugin_basename(__FILE__) ).'templates/bs-content-product.php';
}   

            include($template);

Possible here goes something wrong on windows.

ghost commented 10 years ago

I just installed it on my linux server, there is no fatal error anymore. I don't have own a Windows server, I can't help with a login. I found the line you indicated. Do you wish me to modify something ?

bassjobsen commented 10 years ago

Okay thanks. I expect $template = WP_PLUGIN_DIR.'/'.str_replace( basename( __FILE__), "", plugin_basename(__FILE__) ).'templates/bs-content-product.php'; will cause the error on windows. Maybe related to: http://wordpress.stackexchange.com/questions/49331/why-doesnt-wp-plugin-dir-definition-use-directory-separator i will try to fix this in the next version