Skip to:
Content
Pages
Categories
Search
Top
Bottom

Edit Topic Page


  • wdseocompany
    Participant

    @wdaseocompany

    Hi there,

    Just wondering if anyone would be able to assist with an issue I’m experiencing on a site we’re working on. Unfortunately unable to share a link due to the nature of the project.

    Summary: When clicking on the edit button on the front end of topics as any role it redirects to a page showing all posts, on all forums in date order.

    Setup: The way this information is pulled in to the page is using the shortcodes to pull in the topic information, using PHP to get the id of the page (in turn, the topic), adding it to the shortcode and then executing it.

    This seems to be working well to date aside from the editing of the topic; as the reply function is working nicely. Basically as soon as it pops in the /edit at the end of the URL it doesn’t show the right info.

    Any advice would be fantastic, again I know it is difficult without a URL however any suggestions would be great.

    Kind Regards,
    Matt P

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

  • Robin W
    Moderator

    @robin-w

    ok, so if you take out the site name, what is the url of a topic edit?


    wdseocompany
    Participant

    @wdaseocompany

    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


    Robin W
    Moderator

    @robin-w

    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


    wdseocompany
    Participant

    @wdaseocompany

    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!


    Robin W
    Moderator

    @robin-w

    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 🙂


    wdseocompany
    Participant

    @wdaseocompany

    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


    Robin W
    Moderator

    @robin-w

    🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar