• Resolved cdb3212

    (@cdb3212)


    Hi,

    I get this error when I activate BadgeOS:

    Fatal error: Call to undefined function p2p_register_connection_type() in /home/cdb3212/public_html/wp-content/plugins/badgeos/badgeos.php on line 140

    Here is the code including and around line 140 (I did not edit any code)

    // Connect steps to each achievement type
    				// Used to get an achievement's required steps (e.g. This badge requires these 3 steps)
    				p2p_register_connection_type( array(
    					'name'      => 'step-to-' . $achievement_type,
    					'from'      => 'step',
    					'to'        => $achievement_type,
    					'admin_box' => false,
    					'fields'    => array(
    						'order'   => array(
    							'title'   => 'Order',
    							'type'    => 'text',
    							'default' => 0,
    						),
    					),
    				) );

    I appreciate any help.

    Thank you.

    https://wordpress.org/plugins/badgeos/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    What version are you running?

    Thread Starter cdb3212

    (@cdb3212)

    1.3.5

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’m curious if it somehow didn’t update all of the files, or had an issue with it. We can see by your paste above that we have the function.

    Do you think you could see if it persists after a manual upload of the 1.3.5 zip? as opposed to the WP Admin updater.

    Thread Starter cdb3212

    (@cdb3212)

    I just tried manually uploading it and when I activated it, I got the same fatal error.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Very odd. all of the p2p stuff is in the includes/p2p folder and the function that’s erroring for some reason is located in includes/p2p/p2p-core/api.php

    If that’s not available for some reason, then something is going on with the uploads/updates.

    Thread Starter cdb3212

    (@cdb3212)

    What do you suggest I do? I really like your plugin and want to continue using it, I had it working before I upgraded to 1.3.4 and was surprised I got the same errors when I upgraded to 1.3.5.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Did you check and confirm that file I mentioned was in good order and available and not corrupt?

    Thread Starter cdb3212

    (@cdb3212)

    The file was there. I honestly don’t know whether or not the file is corrupt or not, I was able to open the file in TextEdit though, if that means anything.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you willing to let me in via ftp/WP user? I’m curious what’s up and I don’t want to lose you as a BadgeOS user.

    Thread Starter cdb3212

    (@cdb3212)

    Ya I’ll make you a user.

    Do you have an email so I can send login details?

    I appreciate your commitment to fixing this.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    michael @ webdevstudios dot com

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Got the email.

    Before I touch anything, is this a live site that I need to be super careful on or is it still a private “in development” site?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Nevermind, visited the site, saw “hello world” on the front page πŸ™‚

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    This is what I’ve discovered, and hopefully it makes sense.

    BadgeOS uses something called Post-2-Post to help with the connections that we create. It was done by a smart person who goes by Scribu. Inside this is a scb folder which he also created/uses/etc.

    You have a different plugin named Smart Archives Reloaded. This is done by Scribu as well. It also uses a copy of the scb folder metioned earlier. This is where the issue arises.

    The files in the two scb folders are different versions. From the looks of it, the version in Smart Archives Reloaded is being loaded first, and this is causing issues with loading of files inside BadgeOS. Due to how the scb files are written, specifically it tries to avoid conflicts with itself, if the functions and whatnot already exist in the php namespaces, it won’t re-load the same ones and avoid conflict. With SAR loaded first, we never have the BadgeOS version loaded.

    Sadly, at the moment I don’t have a solution to get around this. I will file an issue with BadgeOS regarding it, but there’s definitely a chance that it falls outside our control as well. You can follow along at https://github.com/opencredit/badgeos/issues/240 if you want.

    Hope that helps somewhat. Not sure how critical both plugins are for what you’re trying to accomplish.

    Thread Starter cdb3212

    (@cdb3212)

    Michael,

    I appreciate all the time you took to resolve this. I’m planning on using BadgeOS over Smart Archives until the greater issue is resolved.

    Thank you.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘p2p register connection type fatal error’ is closed to new replies.