• Resolved Chris Schrijver

    (@chrisschrijver)


    We have a theme with basepress running as some kind of intranet on a custom port (88). With this custom port basepress is not able to recognize if it’s on the homepage or not, because the custom port is not considered. If you change the line with “$current_url = ….” “is_home_page” method in class-basepress-variable.php to:

    $current_url = trailingslashit( $_SERVER[‘SERVER_NAME’] . ( !in_array( $_SERVER[‘SERVER_PORT’], [’80’, ‘443’] ) ? “:{$_SERVER[‘SERVER_PORT’]}” : null ) . $_SERVER[‘REQUEST_URI’] ); // phpcs:ignore

    ….it works properly.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author BasePress

    (@codesavory)

    Hi Chris,

    Can’t really help with the local server and a sysadmin may know more about this. The plugin really doesn’t have anything to do with a port/custom port.

    But I am adding this in list of issues so a dev could look into it just in case.

    Thread Starter Chris Schrijver

    (@chrisschrijver)

    We basically the plugin does have something to do with the port because it’s not taken in to consideration when the plugin checks if it is on the homepage or not. Because this check fails (when the website is on a url with a custom port, ex. example.com:88), assets are not being loaded.

    But my fix from the the initial message solves this. i’m using this now on our enviroment and it works.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Url with custom port not supported (fix included)’ is closed to new replies.