Home › Forums › BulletProof Security Free › BeTheme – displays blank
- This topic has 16 replies, 4 voices, and was last updated 8 months, 2 weeks ago by
QuirinoKing.
-
AuthorPosts
-
rupprich
ParticipantAfter Updating BulletProof Security to Version 2.1 the BeTheme is not working anymore.
It seems to strip out some code, so the page is blank.
If we deactivate the BulletProof Security Plugin the page is shown correct.
What can I do to solve this issue? Has it something to do with Whitelisting?
Link to the Theme (often used):
http://themes.muffingroup.com/be/splash/
https://themeforest.net/item/betheme-responsive-multipurpose-wordpress-theme/7758048AITpro Admin
KeymasterAdd the WP_DEBUG code in your wp-config.php file (in an appropriate place) and post any errors that you see or that are logged in the /wp-content/debug.log.
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', true);
AITpro Admin
KeymasterI just downloaded, installed and tested BeTheme version 8.1 (newest version is 20.2) and did not see any errors or problems.
rupprich
ParticipantThere are only errors in the /wp-content/debug.log if BPS Plugin is active. We are using the latest Version 20.2 of the BeTheme. Also Version 15.9 is not working for us avtivating BPS. Activating another theme with same content works fine, also with BPS activated.
The logged errors in the /wp-content/debug.log:
[03-Jul-2017 01:21:36 UTC] PHP Notice: Trying to get property of non-object in /usr/www/users/music/www/wp-content/themes/betheme/includes/header-top-bar-right.php on line 30 [03-Jul-2017 01:21:36 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_cart_url() on null in /usr/www/users/music/www/wp-content/themes/betheme/includes/header-top-bar-right.php:30 Stack trace: #0 /usr/www/users/music/www/wp-includes/template.php(690): require() #1 /usr/www/users/music/www/wp-includes/template.php(647): load_template('/usr/www/users/...', false) #2 /usr/www/users/music/www/wp-includes/general-template.php(167): locate_template(Array, true, false) #3 /usr/www/users/music/www/wp-content/themes/betheme/includes/header-top-area.php(119): get_template_part('includes/header', 'top-bar-right') #4 /usr/www/users/music/www/wp-includes/template.php(690): require('/usr/www/users/...') #5 /usr/www/users/music/www/wp-includes/template.php(647): load_template('/usr/www/users/...', false) #6 /usr/www/users/music/www/wp-includes/general-template.php(167): locate_template(Array, true, false) #7 /usr/www/users/music/www/wp-content/themes/betheme/header.php(79): get_template_part('includes/header', 'top-area') #8 /usr in /usr/www/users/music/www/wp-content/themes/betheme/includes/header-top-bar-right.php on line 30
AITpro Admin
KeymasterYou have a coding mistake in your Theme code that needs to be fixed. open and edit the header-top-bar-right.php file and fix the coding mistake at code line: 30.
PHP Fatal error: Uncaught Error: Call to a member function get_cart_url() on null in /usr/www/users/music/www/wp-content/themes/betheme/includes/header-top-bar-right.php:30
AITpro Admin
KeymasterI just downloaded, installed and tested BeTheme version 14.5 and did not see any errors or problems. I found a couple more copies of the BeTheme, but I won’t know what versions they are until the downloads are completed. I don’t believe the problem is caused by BPS, but it could be. I think the problem is a coding mistake in the Theme code at this point.
Update: I just downloaded, installed and tested BeTheme version 15.3 and did not see any errors or problems.
AITpro Admin
KeymasterOk I did a google search for that php error found 2 websites with the same error and both of them have the BPS plugin installed. So that would mean that BPS must be interfering with the BeTheme code in this file at code line 30: header-top-bar-right.php. Unfortunately, the BeTheme has not coded whatever that function does gracefully so instead of a problematic php error, you instead have a Fatal Error and a blank website. Send me the header-top-bar-right.php file so I can see what the get_cart_url() function is doing. I should be able to add some graceful coding conditions to at least move forward in troubleshooting without a blank website/the problem.
AITpro Admin
KeymasterThe BPS code that I suspect might be causing the problem is in the /bulletproof-security/includes/login-security.php file.
if ( ! function_exists( 'is_plugin_active_for_network' ) ) { require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); } if ( $woocommerce_active == 1 || is_plugin_active_for_network( $woocommerce ) ) {
rupprich
ParticipantIt´s the original code from betheme/includes/header-top-bar-right.php.
28 // WooCommerce Cart 29 if( $has_cart ){ 30 echo 'cart->get_cart_url() .'"><i class="'. $show_cart .'"></i> <span>'. $woocommerce->cart->cart_contents_count .'</span>'; 31 }
We are not using woocommerce at all. There are only errors in the /wp-content/debug.log if BPS Plugin is active.
If we deactivat BPS the BeTheme is running with Version 20.2 and Version 15.9 without problems and errors.The setup-wizard shows the following notice:
BulletProof Security Login Security & Monitoring Options Setup Notice: Undefined variable: BPS_LSM_Options in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 723 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 731 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 733 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 734 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 735 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 736 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 737 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 738 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 739 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 740 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 741 Notice: Undefined variable: bps_login_security in /usr/www/users/music/www/wp-content/plugins/bulletproof-security/admin/wizard/wizard.php on line 742
Any idea?
AITpro Admin
KeymasterOk so looking at the BeTheme 15.3 code they have declared the $woocommerce variable a Global and like dummies we did not create a unique variable name for the $woocommerce variable in the BPS login-security.php file. Normally that would not be a problem, but the BPS $woocommerce variable is not enclosed in a function and is instead being loaded Globally. Argh.
Do this to confirm and fix the problem. Open and edit this BPS plugin file: /bulletproof-security/includes/login-security.php at code lines: 11-18 and change all the variable instances of $woocommerce to $bps_woocommerce and $woocommerce_active to $bps_woocommerce_active as shown below:
$bps_woocommerce = 'woocommerce/woocommerce.php'; $bps_woocommerce_active = in_array( $bps_woocommerce, apply_filters('active_plugins', get_option('active_plugins'))); if ( ! function_exists( 'is_plugin_active_for_network' ) ) { require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); } if ( $bps_woocommerce_active == 1 || is_plugin_active_for_network( $bps_woocommerce ) ) {
AITpro Admin
KeymasterYep, it would not matter if you are using WooCommerce or not. The $woocommerce Global would still come into play and cause this collision/conflict. The BeTheme has declared the $woocommerce variable as a Global. See the BeTheme code below. 😉
function woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce;
rupprich
Participantheader-top-bar-right.php:
<?php global $woocommerce; $translate['wpml-no'] = mfn_opts_get('translate') ? mfn_opts_get('translate-wpml-no','No translations available for this page') : __('No translations available for this page','betheme'); ... ... ...
AITpro Admin
KeymasterSee this Reply that I am 99.99% sure will fix the problem. Do the steps in this Reply: https://forum.ait-pro.com/forums/topic/after-update-to-version-2-1-the-betheme-is-not-working/#post-33553
Once you confirm that the fix works then we will get another BPS plugin version released with that fix in it.
You can disregard the Setup Wizard php errors. They are insignificant and being displayed because you have WP_DEBUG turned On.
rupprich
ParticipantGreat Job man! Now BPS Security and BeTheme works fine!
I would never give up BPS Security! BPS Security is fantastic! Thanks!
AITpro Admin
KeymasterGreat! Thanks for confirming the fix worked. We will get a new BPS plugin version released ASAP with this bugfix. Dumb mistake. 🙁
-
AuthorPosts
- You must be logged in to reply to this topic.