• I have installed WP User fronten according to the installation including adding pages for Dashboard, Edit Post & New post.
    Everything seems to work except when I try to edit a post. I get redirected to the correct page, the heading is there, but no content meaning the only thing present on the page is the heading.

    I tried it both on my home test site and the live site, but same result.

    the page I am redirected to is:
    https://mydomain.dk/?page_id=129%3Fpid%3D13&_wpnonce=af4877e69e

    permalink for the post I am trying to edit: https://mydomain.dk/?p=13

    I have not changed the permaling structure, as I cant use postname in the permalinks due to national characters, so I have a red warning in the top of the admin panel: You need to set your permalink custom structure to at least contain /%postname%/ before WP User Frontend will work properly.

    I hope that this isnt the rootcause of the problem, as I do not want to change permalink structure.

    apart from this, the plugin works as designed ??

    https://www.ads-software.com/extend/plugins/wp-user-frontend/

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m having the same problem. I wonder if it has anything to do with the fact that the post is not yet published (I have it set to go in as pending). The page shows up if I’m logged in as an admin but not a contributor and it isn’t really clear how it’s supposed to work.

    Thread Starter finnj

    (@finnj)

    The problems seems to be related to how the link is created:

    https://mydomain.dk/?page_id=129%3Fpid%3D13&_wpnonce=af4877e69e

    If you replace: %3F with &
    an replace: %3D with =

    you get:

    https://mydomain.dk/?page_id=129&pid=13&_wpnonce=af4877e69e

    This link works, and I am able to edit the post, and save it.

    Strange thing is that 3D (or 3d) is the hex value for =, but 3F (or 3f) is the hex value for ?

    It is only the problem with the edit link, the delete link from the dashboard is correctly formatted

    I changed the following in wpuf-dashboard.php (line 159)
    <a href="<?php echo wp_nonce_url( $url . '?pid=' . $post->ID, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>
    to:
    <a href="<?php echo wp_nonce_url( $url . '&pid=' . $post->ID, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>

    short, I changed ?pid= to &?pid=

    Now it works ??

    I am aware that the change probably needs to be a bith more sophisticated as url’s without pid=99 wont contain ? already and as such the code will work for some of the cases.

    I suggest a change where $url is checked for “?”, and if this is the case then &pid=

    I am very new with WordPress and reasonably new with pmp, so there might be a conseqense of my change that i I am unaware of, but it seems to work.

    Thread Starter finnj

    (@finnj)

    Argh!!!

    Should have been:
    short, I changed ?pid= to &pid=

    Ok, I got it to work.
    You have to create the dashboard page, which will allow users to see their posts. When they click edit it will take them to the edit page where they can edit their post.

    Thread Starter finnj

    (@finnj)

    I replaced line 159 in wpuf-dashboard.php with the following code, which “should” work regardless of permalink structure:

    if (stripos($url, '?')==0)
    										{
    										  $pid_lead = '?pid=';
    										}
    										else
    										{
    										  $pid_lead = '&pid=';
    										}
                                        ?>
                                        <a href="<?php echo wp_nonce_url( $url . $pid_lead . $post->ID, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>

    as said before, I am not a genious at this, so it can probably be done smarter, but it works for me.

    Please advice if this will make it into following version

    Thread Starter finnj

    (@finnj)

    That wasnt readable, sorry:

    if (stripos($url, '?')==0)
      {
    
      $pid_lead = '?pid=';
    
      }
    
      else
      {
      $pid_lead = '&pid=';
      }
      ?>
      <a href="<?php echo wp_nonce_url( $url . $pid_lead . $post->ID, 'wpuf_edit' ); ?>"><?php _e( 'Edit', 'wpuf' ); ?></a>

    Thread Starter finnj

    (@finnj)

    It is working for me now, but i still would like to get rid of the error message:
    You need to set your permalink custom structure to at least contain /%postname%/ before WP User Frontend will work properly.

    How do I do that ?

    professor99

    (@professor99)

    The new development version 4.3 I have now released fixes now enables Frontend to work with the default WordPress permalinks and fixes the problems above

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Edit Post – No content’ is closed to new replies.