Skip to:
Content
Pages
Categories
Search
Top
Bottom

edit on the Front-end doesn't work anymore


  • bustel
    Participant

    @bustel

    I have updated my wordpress to the newer version, wordpress version: 3.8.3, bbpress version: 2.5.3.

    I have a problem with “edit” on the front-end, if i want to edit a post then the page says: “The page you requested could not be found.”….

    What can be done to prevent this problem? or to fix the problem?

    the permalinks on my website are: /%postname%/%category%/

    the url to edit the post is: http://…../…./…./…./post01/edit/

    thanks for the answer.

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

  • bustel
    Participant

    @bustel

    the permalinks on my website are: /%postname%/%category%/


    Robin W
    Moderator

    @robin-w

    Try

    rewrite rules
    This could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.

    and if that doesn’t work try

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.


    bustel
    Participant

    @bustel

    I have tested the permalinks, I set it to “standard”, then the problem is solved and the url shows: “http://www…../?topic=ah-les-belles-bacchantes-versie2&edit=1”. When I set the permalinks again to “/%postname%/%category%/” the problem is back, it show the follow url: “http://www…./…/…/edit/”.


    bustel
    Participant

    @bustel

    Is there any solution for this problem? Is it a bug?


    bustel
    Participant

    @bustel

    when I set it manuel this: ‘?edit=1’ after the url, then it works… but it’s not a solution…


    bustel
    Participant

    @bustel

    I have found a solution for this problem:

    edit function: bbp_get_topic_edit_url
    in the file: wp-content/plugins/bbpress/includes/topics/template.php

    search for: // Get uri (normal on line: 2507)

    set $uri = bbp_get_topic_edit_url( $r[‘id’] );
    as text like this: // $uri = bbp_get_topic_edit_url( $r[‘id’] );
    then put this after: $uri = ( ‘?edit=1’ );

    so you get this:

    // Get uri
    // $uri = bbp_get_topic_edit_url( $r[‘id’] );
    $uri = ( ‘?edit=1’ );

    save the php file and upload and overwrite the file on your site.


    bustel
    Participant

    @bustel

    // Get uri
    // $uri = bbp_get_topic_edit_url( $r['id'] );
    $uri = ( '?edit=1' );

    bustel
    Participant

    @bustel

    Do the same thing for:

    edit function: bbp-reply-edit-link
    in the file: wp-content/plugins/bbpress/includes/replies/template.php

    on line 1922

    // Get uri
    // $uri = bbp_get_reply_edit_url( $r['id'] );
    $uri = ( '?edit=1' );

    bustel
    Participant

    @bustel

    So you have to edit 2 files:
    1) wp-content/plugins/bbpress/includes/topics/template.php
    2) wp-content/plugins/bbpress/includes/replies/template.php

    normally it should work, i have tested and it’s working fine for me… maybe the newer version should be adapted with these new functions?


    bustel
    Participant

    @bustel

    damned… this is not a solution for wp-content/plugins/bbpress/includes/replies/template.php …


    Robin W
    Moderator

    @robin-w

    just had a quick look, can’t see why it would work for topics but not replies.

    what is the url resolving to at the top of the screen?

    maybe try

    either
    $uri = ( ‘/?edit=1’ );

    or

    $uri = bbp_get_reply_edit_url( $r[‘id’] ) .’?edit=1′ ;


    bustel
    Participant

    @bustel

    It works for the topics but not for the replies, I don’t know why it doesn’t work…

    I have tested with
    1)
    $uri = ( '/?edit=1' );
    in the topic: http://www.mysite.com/?edit=1
    it isn’t correct
    it go to the home of the site, that’s it.

    2)
    $uri = bbp_get_reply_edit_url( $r['id'] ) . '?edit=1';
    in the topic: http://www.mysite.com/map/map/1827/edit/?edit=1
    and it isn’t correct eather…
    it says: The page you requested could not be found.


    bustel
    Participant

    @bustel

    And if i set it to:
    $uri = ( '?edit=1' );
    then I get the topic to change and not the reply….


    bustel
    Participant

    @bustel

    After a long search I found a solution for my problem…

    instead of:
    $uri = bbp_get_reply_edit_url( $r['id'] );
    set:
    $uri = $_SERVER['REQUEST_URI'].( '/../../../give-reaction/' . $r['id'] . '?edit=1' );
    on line: 1923


    bustel
    Participant

    @bustel

    The problem of those problems is when you don’t want to set a standard permalink, I want to set my own permalinks and then I get those problems… there must be a better way to get it to work, isn’t it? So the programmer of this script have to look forward for a solution for those problems. I’m not a programmer, i know a little bit that’s it. I look forward to an update of this script. 🙂 Congratulations to the programmer, it’s a nice script!

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