ok, so if you take out the site name, what is the url of a topic edit?
Hi Robin, thanks for coming back so quick; the URL of the topic would be:
/forums/topic/test-topic-creation/
Then when pressing the edit button it’s:
/forums/topic/test-topic-creation/edit/
Kind Regards,
Matt P
ok, so presuming this is in any topic, then if you fancy sharing the shortcode you are using and the php code, I might take a look at that
Outside of your php code, I’d suggest it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
Just for information the theme is Divi, using their theme builder allowing me to style and format whole taxonomies a little easier (in theory haha)
For the bits of PHP – This is what I’m using to pull in the information for singular forums:
$page_id = get_queried_object_id();
$dynamic_forum_shortcode = ‘[bbp-single-forum id=' . $page_id . ']‘;
echo do_shortcode($dynamic_forum_shortcode);
And for topics as follows:
$page_id = get_queried_object_id();
$dynamic_topic_shortcode = ‘[bbp-single-topic id=' . $page_id . ']‘;
echo do_shortcode($dynamic_topic_shortcode);
So in theory the idea is:
1. Pull in page id as identifier
2. Form shortcode for forum/topic
3. Add these PHP snippets to the Divi template using the Code Snippets plugin
Then when someone accesses the page it should call in topic/forum based on the ID of the page
I’ll take a look into this tomorrow, changing theme and disabling plugins as thankfully it isn’t live just yet. Thanks for your help so far anyway but if you can spot any flaw in the logic so far please do alert me!
ok, I’d suspect something in the way Divi is seeing urls with the topic in, but that’s just my guess.
so once you’ve done the theme/plugin thing, come back with what you found out 🙂
Hi Robin,
Thanks for the info on this one; I’ve managed to get this resolved. In essence I was overcomplicating the problem.
I disabled the templates I had setup so the page could just return all the default content and the edit functionality was working. Instead of using the custom code snippet I just used the ‘Post Content’ module in Divi which worked beautifully.
Coming back to it with a fresh set of eyes and taking it back to basics helped a lot haha!
Thanks again Robin for your help, all the best!
Kind regards,
Matt P