• I was having an issue with the plugin not being able to access gallery pages past the first one, because for some odd reason the plugin author added the port number into the URL for each subsequent page. There’s no reason to do this since he’s already checking whether the URL should start with http or https. The port shouldn’t matter.

    Anyway, if you have this problem you can fix it by editing the file afg_libs.php in the plugin folder. Get rid of lines 181 and 182, and on line 183 remove .$port after [“HTTP_HOST”]:

    $url = ($isHTTPS ? 'https://' : 'https://').$_SERVER["HTTP_HOST"].$port.$_SERVER["REQUEST_URI"];

    • This topic was modified 7 years, 3 months ago by davekuhar.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter davekuhar

    (@davekuhar)

    For reference, here are the lines to remove:

        $port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443")));
        $port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : '';
    
    Thread Starter davekuhar

    (@davekuhar)

    Hey, plugin author: you need to remove this code permanently, since there’s no point in having it and it just breaks my fix every time you issue an update. You don’t need to hard code a port number.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem with port solved’ is closed to new replies.