Is [list-bpdocs] obsolete?
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Is [list-bpdocs] obsolete? If so, is there a new easy way to list all of the documents?
We have a Commons in a Box that has been working well with little or no maintenance for several years. This statement is now causing problems. It started getting a warning recently.
[list-bpdocs]
<b>Warning</b>: Use of undefined constant id – assumed ‘id’ (this will throw an Error in a future version of PHP) in <b>/home/XXXXX/wp-content/plugins/shortcode-exec-php/shortcode-exec-php-class.php(895) : eval()’d code</b> on line <b>4</b>
Here is line 895.
<div>$result = eval(WPShortcodeExecPHP::Get_option(c_scep_option_phpcode . $code));</div>
<div></div>
<div>I did not set this site up. The directory <b>wp-content/plugins/shortcode-exec-php is old – </b>no files more recent that 2015.</div>
<div></div>
<div>I do not know PHP and I am not too eager to learn, but, I’m open to a quick hack. Or potentially porting something.</div>
<div></div>
<div></div>
Hi Jan,
I’m guessing you had some custom work done to your site where a developer added the plugin to your site and added a custom list-bpdocs
shortcode.
The warning is coming from the shortcode-exec-php
plugin, which doesn’t come bundled with CBOX and is no longer available on the wordpress.org repository.
If you still want to keep the shortcode-exec-php
plugin, you can disable debug warning notices on your install by setting WP_DEBUG
to false
in your wp-config.php
file. You can read more about this here – https://wordpress.org/support/article/debugging-in-wordpress/
Hope that helps!
Hi Ray,
Thanks for your reply. The CBOX site was set up by an ancient hacker. His theory was that if he made things simple enough, other people would use it. He made a home-brew wiki that basically only he * I used….
I’m not familiar with php, or, WordPress, or BuddyPress or any of the guts here. I do figure things out eventually. WP_DEBUG was set to false already. I don’t like the part about throwing an error in the future.
My guess is that the “short codes” expand into some code somewhere.
I do really like the “list all documents” feature. Is there an alternative method to get this feature?
Thanks!
The BuddyPress Docs plugin does not come with a bundled shortcode.
Outside of writing custom code, perhaps you can link to the documents directory page instead?
If you’re okay with that, you can find the document directory page at example.com/docs/
by default. For example: https://demo.commonsinabox.org/docs
Replace example.com
with your site. However, if you’ve changed the directory page slug from docs
to something else, you’ll need to replace that as well. You can find the document page settings at example.com/wp-admin/edit.php?post_type=bp_doc&page=bp-docs-settings
.
Hope that helps.