WordPress.org

Ready to get started?Download WordPress

Forums

Delightful Downloads
[resolved] Files does not exist - error messages as a result of subdomain (3 posts)

  1. Lou Friedman
    Member
    Posted 6 months ago #

    Uploading files to my WP install worked fine, but when I clicked a button in the front-end it returned the error File not found!. Digging into the code within functions.php of this plugin, there is an issue on line 109:

    function dedo_root_dir( $path = '' ) {
    	return $_SERVER['DOCUMENT_ROOT'] . $path;
    }

    For my install, which was running within the folder "dev" on my webserver's root, this was returning the error. There may be a server misconfiguration, but I'm not IT. So I altered the code to:

    function dedo_root_dir( $path = '/dev/' ) {
    	return $_SERVER['DOCUMENT_ROOT'] . $path;
    }

    And this works fine. I keep a copy locally with path set to '' and in the dev install, it is 'dev'. When I move the site to production it will be '' again.

    But this is not very good code. It needs to be improved to work in all environments with a single file.

    http://wordpress.org/plugins/delightful-downloads/

  2. A5hleyRich
    Member
    Plugin Author

    Posted 5 months ago #

    Thanks for pointing this out. I'll get a fix pushed out in the next update.

  3. A5hleyRich
    Member
    Plugin Author

    Posted 5 months ago #

    Please update to version 1.2.1 to resolve the issue.

Reply

You must log in to post.

About this Plugin

About this Topic