• Resolved mat-Moo

    (@mat-moo)


    I’m using Permalink Manager to manage all my page url structure (for compatibility with old website), however no matter what I do I get a 404 on the download links (tried this sticky no difference).

    When the code gets to the function simple_download_counter_download_handler the $_GET request only contains the query param “key” and nothing else.

    I can fix it by also checking the REQUEST URI to grab the parameter needed… thoughts?

     if (isset($_GET[$key]) && !empty($_GET[$key])) {
    
                $wp->query_vars[$key] = sanitize_key($_GET[$key]);
        } else {
                $uri_segments = explode('/', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
                if ((count($uri_segments) > 3) && ($uri_segments[1] == $key)) {
                    $wp->query_vars[$key] = sanitize_key($uri_segments[2]);
                }
        }
Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Okay understood. Thanks for the information, I will investigate this next available opportunity. In the meantime feel free to post again with any further/related details.

    Plugin Author Jeff Starr

    (@specialk)

    Hello,

    I tried with custom permalink structure and cannot repeat this issue on default WordPress, everything is working normally using /%year%/%monthnum%/%day%/. With that in place, I added a new download, displayed shortcode/link on front end, and downloaded without error.

    So not sure if there is something else like another plugin at issue, or maybe something server/config related..? I don’t know, but I do want to fix any issues, so will leave this thread open in case someone can jump in with some clues or related infos.

    Plugin Author Jeff Starr

    (@specialk)

    Just to follow up, I hope you got this sorted. It’s been a while with no reply so gonna go ahead and mark this thread as resolved to help keep the forum organized. Feel free to post again with any further questions or feedback, Thank you.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘404 no matter what, compatibility issue?’ is closed to new replies.