BP Groupblog Error – Call to undefined function
-
After installing the BP Groupblog plugin, my groups pages are inaccessible. I get the error:
“Call to undefined function bp_groupblog_is_blog_enabled()”
I’m using WPMU version 2.9.1.1, BuddyPress v.1.1.3, and BP Groupblog v. 1.3.1
Anyone have a suggestion for what might be going on?
-
this is a plugin issue and you might consider asking for help from the plugin author and/or following this thread.
‘M’ gave a solution to fix plugins that broke between 2.8.6 and 2.9.1 at the end of this thread. Haven’t had time to try yet…
I’ve got the same error as the OP. Has anyone tried ‘M’s solution? Share the complete plugin code if possible. It would help those of us that are ‘code’ challenged
Call to undefined function bp_groupblog_is_blog_enabled() in /bp-groupblog/bp-groupblog.php on line 127
wpmu – 2.9.1.1, bp – 1.1.3, bp-groupblog 1.3.1
Mark – I tried M’s solution, as well as I understood it, with no success.
Did you install the template “bp-groupblog” into wp-content/themes ?
Chouf1 aka DaNiel invites you to test bp-groupblog here:
http://buddypress-fr.net/bpdemo/groups/groupe-de-tests/blog/
@Chouf1/DaNiel, thanks for sharing your working groupblog. I guess it makes it a bit more challenging to figure out the problem if it’s not universal. Was your 2.9.1.1 a new install?
Mine is an upgrade so the template “bp-groupblog” was and still is located in wp-content/themes.
Not sure.
I installed the plugin through the Plugins > Manage Plugins and then followed these instructions:
2) move the /bp-groupblog/themes/bp-groupblog folder to your WPMU themes folder
So now it’s at [my installation directory]/wp-content/themes/bp-groupblog
and I also tried [my installation directory]/wp-content/themes/bp-content/bp-groupblog
But still I get the error above: Call to undefined function bp_groupblog_is_blog_enabled()
I use BP since 0.9 beta…so it’s an updated, updated,updated site…
Did you allow blog creation to your members ? Because in the “undefined function”, enabled is set to 1 (yes)
Check also the plugin admin ( who is administrator, members, authors, etc)
Maybe you have a conflict with a plugin ?
Deactivate all your plugins except BP
Reactivate first (site wide) bp-groupblog and view if the error occurs.
If nothing happens, reactivate the other plugins one by one until you find the bad boy.
Also don’t forget to update all the (members) blogs after a core update. (i forget this always)
BP Groupblog is still broken … Did anyone have any luck making this work … I have not and the instructions are not clear to follow.
@dcaweb – Thanks for all of your suggestions. Again for my situation, groupblog worked fine until I upgraded wpmu. I only made one change (updated wpmu) and Groupblogs immediately broke. I have disabled plugins with no change in the status of groupblog. To be clear, all seems to work fine except Group pages.
Selecting any Group (with groupblog activated) results in a blank page with the following error printed at the top:
Call to undefined function bp_groupblog_is_blog_enabled() in /bp-groupblog/bp-groupblog.php on line 127
line 127 of groupblog.php:
if ( bp_groupblog_is_blog_enabled( $bp->groups->current_group->id ) )
bp_core_new_subnav_item(
array(
'name' => __( 'Blog', 'groupblog' ),
'slug' => 'blog',
'parent_url' => $group_link,
'parent_slug' => $bp->groups->slug,
'screen_function' => 'groupblog_screen_blog',
'position' => 32,
'item_css_id' => 'group-blog'
)
);I FIXED my issue by following Andy’s instructions here:
https://buddypress.org/forums/topic/important-plugin-devs-read-this
Quick solution:
Add the following to the top of groupblog.php:
/*** Make sure BuddyPress is loaded ********************************/
if ( !function_exists( 'bp_core_install' ) ) {
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'buddypress/bp-loader.php' ) )
require_once ( WP_PLUGIN_DIR . '/buddypress/bp-loader.php' );
else {
return;
}
}
/*******************************************************************/I’ve updated the plugin for BuddyPress 1.2, but it will only run on the trunk version until either the RC is released, or the final version.
I usually only have trouble understand php code but this time my english (native language) is failing me… can Andy or another please interpret what plugin is being referenced as being updated for BP 1.2? Is Andy saying that the BP 1.2 plugin will, now (trunk) and in the final version, automatically load buddypress before all other plugins? If yes, the above mentioned code would no longer be needed in each buddypress dependent plugin? Sorry for being a bit ‘slow’ on this
I’ve looked through the trac and my interpretation does Not seem supported…
I’m currently renovating and moving so I’m mostly or completely of the grid. However I will try to make every effort to put in Andy’s code tomorrow to ensure compatibility with wpmu 2.9.1.
Sorry for the inconvenience to those who already upgraded.
Is there any chance of the plugin being official adopted by Buddypress/Automattic, and therefore be supported?
It is a great idea but it is not safe to use if it is not going to supported.
Ditto, subdomains do not seem to be supported yet either.
I find that since the upgrade, even though I can now load the page by following the above, it just does not work. Old blogs are not recognised. If I post in a group, it goes into the main admin website again.
When I go to an old Group Blog page
under ‘Enable group blog’
Blog Title:
Blog Address:
Are blanked out with no titles.
Under the blog menu, there is Dashboard, Add New Post, Add New Link, Add New Page … but these link to main admin site blog not group blog.
I would not want to delete groups and have to remake them
@MariusOoms – no need to apologize. It’s the price we pay to use open source. If it’s a mission critical feature, upgrades can be done on a test server or backups allow for rolling back until all is good to go live. It’s appreciated that you got this plugin established. Anything you can do in the future will also be appreciated.
When upgrading for bp 1.2, take a look at JJJ’s comments regarding hooking dependent plugins in to bp_int. It sounds like it’s the preferred way (over what I posted earlier) to load bp first:
https://buddypress.org/forums/topic/important-plugin-devs-read-this
Best of luck with your move!
@nonegiven – I’m now having no problems with groupblogs. Old Group Blog pages are recognized and all the Blog Menu Options within the Group are associated with the correct group blog. I’d also love to see the groupblog function as part of the core bp.
@Andy – Still confused by your comment but it may not matter given the change JJJ has made to the trunk.
Wait sorry, I was confused above. I meant I’ve updated this plugin:
https://wordpress.org/extend/plugins/external-group-blogs/
Not BP group blogs.
update: While working, all is not perfect as the auto blog membership is not as streamlined as it is designed and used to be.
After upgrade of plugin with above mentioned code to load bp first, regular Group members are no longer being automatically added as Blog members. If I promote a group member to Admin or Moderator, they then are automatically added to the Group Blog (with the correct Blog privileges). I can then demote them back to regular members and their Blog privileges change accordingly. It is interesting that promotions to Admin & Mod both result in automatic Blog membership but being added initially as a regular group member does not (but used to prior to wpmu 2.9.1.* and upgrading groupblog plugin). Thoughts?
I posted the above info at Boone’s site since he contributed the ‘streamling’ functionality to groupblogs:
Thank you for the honesty in confirming a few of the things that I discovered.
What is the process by which elements are adopted into the core?
And how supported is BP really at being adopted into the core of WPMU?
It seems to me to be still left hanging outside somewhere … especially with the 2.9.1 upgrade. I mean, not that there are paid developers, should the two elements really not be released in parallel?
BP will never merge into WPMU / WP.
That would be bloat overkill!
However, the BP dev team does contribute code back to the WP core (bugs, patches and such).
BP won’t merge into WP. When people discuss merging something into the core, they’re usually discussing adding x plugin into the bp core, NOT to the wp core.
Any rough ETA when this will be supported on 2.9.1.1/1.2?
Only slightly off topic…does someone have a working demo/site of GROUPBLOG? I’ve tried to install it on my WPMU 2.9.1.1 and BP 1.2 but no luck. I want to be able to play with it a bit to see if it’s relevant to my site needs. Thank you much!
The plugin itself hasn’t been upgraded for 1.2 yet so anyone’s demo site will be something that they modified the plugin to work and that’s mostly for people that modified it to get it working with 2.9.1 and bp 1.1.3. You’re probably going to have to hold off until it gets upgraded for 1.2 to really see how it works
Sorry, I did not mean -core.php, I just meant ‘core development’ as in the management use of the term.
R-A-Y, please, “Bloat” is a 150MB printer driver … a few kb of BP is not “bloat”. Good heavens, old chap, it is not 1997 any more. We have moved on a bit since 28k modems you know, otherwise WP would be written in machine code.
What I mean is BP is now part of the Auttomatic stable, right? Could its development just not run in tandem to WPs development so that releases came out together at the same time and worked?
If such was to happen, my vote would be for group blog to be included as a core element of the BP concept. It is a great idea and, if implemented, it is too great a loss for it to break, be lost or forgotten when Marius gets run over by a bus.
How does that process take place?
Well….I have finally moved to our new address…three doors down…and can assure you that we will make the groupblog compatible with bp1.2 and wp2.9+ in the coming weeks. However our site still runs at previous versions of both bp and wp. Our plugins follow the upgrade path at the speed of development of our organization site.
We are merely sharing with you the efforts we put in that are required by our own product. Anything beyond that would fall under hobby or paid service (and hobbies I have plenty especially as the new proud owner of the iPhone 3GS). So hang in there as I will start upgrading our organization along with the needed plugins.
Pray for me that I will not get run over by a bus if you find the time
- The topic ‘BP Groupblog Error – Call to undefined function’ is closed to new replies.