Support » Plugin: Business Directory Plugin - Directories for WordPress » url bug in listing_contact.php can_submit

  • Resolved jonathanmoorebcsorg


    Hi, there is a
    url bug in listing_contact.php can_submit
    code wp_login_url( site_url( $_SERVER[ 'REQUEST_URI' ] ) )
    is incorrect for child sites which are subdirectories because request_uri includes the subdirectory part of the site path, which is also included by site_url() causing a doubling up of this part of the path.

    The working code would be: wp_login_url( get_permalink() )
    This would need to be fixed in the plugin as filters can’t readily handle the invalid parameters being passed to site_url and wp_login_url

Viewing 2 replies - 1 through 2 (of 2 total)
  • jonathanmoorebcsorg


    this also applies to:
    class-view.php _auth_required()

    $current_url = urlencode( site_url( $_SERVER['REQUEST_URI'] ) );
    $login_url = add_query_arg( 'redirect_to', $current_url, $login_url );

    site_url( $_SERVER[‘REQUEST_URI’] ) does not work for child sites using subdirectory paths.
    $login_url = wp_login_url( get_permalink() );
    should work..

    Plugin Author businessdirectoryplugin


    Hi @jonathanmoorebcsorg,

    Sorry that you ran into issues here!

    I’ve submitted this info to my developer but I don’t expect that much will happen until after the holidays as things are ramping down here for the end of the year.

    We’ll investigate and add the best solution to the next patch release.

    Thanks for letting us know and hope you have a nice holiday!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘url bug in listing_contact.php can_submit’ is closed to new replies.