Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
wp undefined function error
Avatar
rb22
Member
sp_UserOfflineSmall Offline
Aug 27, 2015 - 7:55 pm

Fatal error: Call to undefined function is_plugin_active() in /home/XXXXXX/public_html/wp-content/plugins/simple-press/sp-api/sp-api-common-display.php on line 427

 

I am getting something like this error too when I load the "forurms" page via wordpress

I have buddypress installed.

 

The line in question is

 

function sp_build_profile_formlink($userid) {
        global $spThisUser;

        $sfprofile = sp_get_option('sfprofile');
    $mode = $sfprofile['formmode'];

    # if profile mode is BP or Mingle but they are not active, switch back to popup profile

// LINE 427 is here---->

    if (($mode == 3 && !is_plugin_active('buddypress/bp-loader.php')) || ($mode == 5 && !is_plugin_active('mingle/mingle.php'))) {
        $mode = 1;
    }

        switch ($mode) {

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 27, 2015 - 8:42 pm

yeah, understood where it was.. but its a standard wp function that should always be available...  still stymied why for your installation (and yours only thus far), its not available..

before that line of code, can you insert this code:

print_r(debug_backtrace());

and see what is reported... see where the call stack is coming from...

Avatar
rb22
Member
sp_UserOfflineSmall Offline
Aug 27, 2015 - 11:38 pm

Hi thanks, I am different guy than OP. Just tagging along with his post.

PHP 5.4.23 Centos/Cpanel/Apache2

Heres the backtrace just above the line.

Array
(
    [0] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/plugins/simple-press/forum/content/sp-common-view-functions.php
            [line] => 1197
            [function] => sp_build_profile_formlink
            [args] => Array
                (
                    [0] => 1
                )

        )

    [1] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/sp-resources/forum-themes/css-only/templates/spHead.php
            [line] => 100
            [function] => sp_ProfileEditButton
            [args] => Array
                (
                    [0] => tagClass=spButton spRight
                    [1] => Profile
                    [2] => Edit your profile
                )

        )

    [2] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/plugins/simple-press/forum/content/sp-template-control.php
            [line] => 290
            [args] => Array
                (
                    [0] => /home/XXXXX/public_html/wp-content/sp-resources/forum-themes/css-only/templates/spHead.php
                )

            [function] => include
        )

    [3] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/sp-resources/forum-themes/css-only/templates/spGroupView.php
            [line] => 16
            [function] => sp_load_template
            [args] => Array
                (
                    [0] => spHead.php
                )

        )

    [4] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/plugins/simple-press/forum/content/sp-template-control.php
            [line] => 290
            [args] => Array
                (
                    [0] => /home/XXXXX/public_html/wp-content/sp-resources/forum-themes/css-only/templates/spGroupView.php
                )

            [function] => include
        )

    [5] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/plugins/simple-press/forum/content/sp-template-control.php
            [line] => 90
            [function] => sp_load_template
            [args] => Array
                (
                    [0] => spGroupView.php
                )

        )

    [6] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/plugins/simple-press/sp-startup/forum/sp-forum-framework.php
            [line] => 533
            [function] => sp_process_template
            [args] => Array
                (
                )

        )

    [7] => Array
        (
            [function] => sp_render_forum
            [args] => Array
                (
                    [0] => 
                )

        )

    [8] => Array
        (
            [file] => /home/XXXXX/public_html/wp-includes/plugin.php
            [line] => 213
            [function] => call_user_func_array
            [args] => Array
                (
                    [0] => sp_render_forum
                    [1] => Array
                        (
                            [0] => 
                        )

                )

        )

    [9] => Array
        (
            [file] => /home/XXXXX/public_html/wp-includes/post-template.php
            [line] => 230
            [function] => apply_filters
            [args] => Array
                (
                    [0] => the_content
                    [1] => 
                )

        )

    [10] => Array
        (
            [file] => /home/XXXXX/public_html/wp-content/themes/XXXXX-theme/page-forum.php
            [line] => 40
            [function] => the_content
            [args] => Array
                (
                )

        )

    [11] => Array
        (
            [file] => /home/XXXXX/public_html/wp-includes/template-loader.php
            [line] => 75
            [args] => Array
                (
                    [0] => /home/XXXXX/public_html/wp-content/themes/XXXXX-theme/page-forum.php
                )

            [function] => include
        )

    [12] => Array
        (
            [file] => /home/XXXXX/public_html/wp-blog-header.php
            [line] => 16
            [args] => Array
                (
                    [0] => /home/XXXXX/public_html/wp-includes/template-loader.php
                )

            [function] => require_once
        )

    [13] => Array
        (
            [file] => /home/XXXXX/public_html/index.php
            [line] => 17
            [args] => Array
                (
                    [0] => /home/XXXXX/public_html/wp-blog-header.php
                )

            [function] => require
        )

)
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2015 - 2:04 am

wait... rb22, you seem to have hijacked this thread...  you have a different issue from the OP...  gonna break this into its own topic...

and then please start from scratch... explain the problem... where you are seeing it and such...

Avatar
rb22
Member
sp_UserOfflineSmall Offline
Aug 28, 2015 - 8:58 am

Sorry, I thought it was more  or less the same issue.

I upgraded wordpress to 4.3 and then upgraded to the latest version of simple-press. I do all upgrades manually.

Unfortunately, I didn't try the forum after just the upgrade to 4.3 and upgraded simple-press right away.

Then I went to the wp forum page

I get

Fatal error: Call to undefined function is_plugin_active() in /home/XXXXX/public_html/wp-content/plugins/simple-press/sp-api/sp-api-common-display.php on line 427

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2015 - 11:41 am

what are your settings on forum - integration - page and permalink? namely in the display options...  perhaps some other plugin is running before wp is even fully loaded causing issues...

make sure you have the display in loop set true and the display multiple to false...  and if no change then, try enabling the strict wp api..

Avatar
rb22
Member
sp_UserOfflineSmall Offline
Aug 28, 2015 - 1:37 pm

Changing the settings in integreration didn't help. I tried different options you suggest and more. 

If I insert this into the (wp) page-forum.php template

include_once(ABSPATH.'wp-admin/includes/plugin.php');

whether at the top, before the get_header() or below it, I don't get the error.

simple-press-integration-options.pngImage Enlarger

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Aug 28, 2015 - 1:41 pm

yes, of course... you are forcing wp to load its own file that way... the issue is that wp normally loads it anyway... so something on your site is firing before wp is fully loaded...

so you can either leave that line in there or try tracking it down further...  that would be stuff like trying the default wp theme and seeing if any different... and then if not, disabling other wp plugins and seeing if different...

but understand if you just press on... 🙂

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626