Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Sermon Page - Fatal error: Uncaught Error: Call to undefined function is_plugin_active() #289

Open
hermify opened this issue Mar 11, 2021 · 2 comments

Comments

@hermify
Copy link

hermify commented Mar 11, 2021

Got error on single page:
Fatal error: Uncaught Error: Call to undefined function is_plugin_active() in /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-content/plugins/sermon-manager-for-wordpress/views/partials/content-sermon-single.php:109 Stack trace: #0 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-includes/template.php(732): require() #1 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-content/plugins/sermon-manager-for-wordpress/includes/sm-template-functions.php(715): load_template('/var/www/vhosts...', false) #2 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-content/plugins/sermon-manager-for-wordpress/includes/sm-template-functions.php(480): wpfc_get_partial('content-sermon-...') #3 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-content/plugins/sermon-manager-for-wordpress/views/single-wpfc_sermon.php(21): wpfc_sermon_single_v2() #4 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-includes/template-loader.php(106): include('/var/www/vhosts...') #5 /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-blog-header.php(19): require_once('/var/www/vhosts...') in /var/www/vhosts/fcg-guetersloh.de/httpdocs/wp-content/plugins/sermon-manager-for-wordpress/views/partials/content-sermon-single.php on line 109

Single Page is broken:
https://fcggt.de/predigt/geistesgaben-wort-der-weisssagung/

### Platform
**Sermon Manager Version: 2.16.7
**WordPress Version: 5.6.2
**PHP Version: 7.4

Any Additional Info

Solution described in here: https://wordpress.stackexchange.com/questions/9345/is-plugin-active-function-doesnt-exist

@hermify
Copy link
Author

hermify commented Mar 11, 2021

I temporary added for myself:

if( !function_exists('is_plugin_active') || is_plugin_active( 'elementor/elementor.php' ) ) {
	the_content();
}else{

@DLBerger
Copy link

Your logic is wrong. It should be:

if( function_exists('is_plugin_active') && is_plugin_active( 'elementor/elementor.php' ) ) { the_content(); }else{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants