WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
File permalink with Query-String (2 posts)

  1. 25th-floor
    Member
    Posted 2 years ago #

    Hi,

    WP-Filebase has a problem with query-strings attached to a files permalink. These can occur when e.g. MailChimp (http://www.mailchimp.com) automatically adds Google Analytics tracking data (campaign name and so on) to all links within a newsletter. The resulting link to a PDF ends up as:

    http://my.domain.com/download/myfile.pdf?utm_source=xxx&utm_campaign=xxx&utm_medium=email

    Which results in a 404 because WP-Filebase uses $_SERVER['REQUEST_URI'] instead of $_SERVER['SCRIPT_URL'] when building the file path from the request. Changing occurrences of $_SERVER['REQUEST_URI'] to $_SERVER['SCRIPT_URL'] in classes/Download.php (function ShouldSendDLHeader()) and classes/Core.php (function DownloadRedirect()) fixes this behaviour.

    Regards,

    http://wordpress.org/extend/plugins/wp-filebase/

  2. Fabian
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for reporting, will be fixed next release!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic