FSE forming an invalid URL for editing

WordPress Event Management, Calendars & Registration Forums Report A Bug FSE forming an invalid URL for editing

This topic contains 2 replies, has 2 voices, and was last updated by  Craig Haller 8 months, 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43046

    The edit link on the front end is being formed like this:
    https://brookline.news/events/event/school-committee/edit-event/?classic-editor
    Note the misplaced ?
    I over edited I am sure but the following fixed it, edits in front-end-edit.php starting at line 509 :

    //  if ( false !== strpos( $permalink, '?' ) ) {
        $link = add_query_arg( 'edit-event', '', $permalink );
    

    // }

    if ( trailingslashit( $permalink ) === $permalink ) {
    

    // $link = trailingslashit( $permalink . ‘edit-event’ );
    }

    if ( ! isset( $link ) ) {
    

    // $link = trailingslashit( $permalink ) . ‘edit-event’;
    }

    Craig Haller
    #43058

    Hi Craig,

    Do you know where the ?classic-editor has come from? Do you have a plug-in active that might have added it?

    Stephen Harris
    #43066

    I do default to the classic editor and thought that may be an issue. I use this: https://wordpress.org/plugins/classic-editor/
    and in Settings -> Writing I have the classic-editor as the default.
    Ultimately I settled on this as my solution (in my template):

        if ( (eo_fes_current_user_can_edit( $event_id ))  &&  (get_post_meta( get_the_ID(), '_eventorganiser_fes', true )) ) { 
        echo 'Edit this event';  
      }
    

    Hope that is not stupid. Seems to work as intended.
    -Craig

    Craig Haller
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.