• Hello,

    Thank you for a nice plugin.

    On a IIS server I get this message when saving: Error: Remote path must be under WP_CONTENT_DIR

    I already entered FTP credentials in the dialog, and in the wp-config. Any ideas

    Greetings,

    Cas

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Is the remote path under WP_CONTENT_DIR?

    Thread Starter convidentcas

    (@convidentcas)

    Yes, I am trying to edit a translation file under wp-content/plugins/<plugin>/languages

    Plugin Author Tim W

    (@timwhitlock)

    Are there any symlinks under the absolute path?

    The code checks your file path against WP_CONTENT_DIR, if they don’t match you’ll get this error. In your case the argument passed as $path does not begin with the path in WP_CONTENT_DIR. This can happen if part of the tree is symlinked, but you’ll have to debug that code to find out why there’s a mismatch.

    Thread Starter convidentcas

    (@convidentcas)

    Hello,

    I think I have found it. In FileWriter.php, in the function mapPath, there is this:

    $base = rtrim( loco_constant('WP_CONTENT_DIR'), '/' );

    This $base contained a number of ‘\’, since this is a Windows/IIS-server. When I add this:

    $base = str_replace('\\', '/', $base);

    saving works as expected.

    Plugin Author Tim W

    (@timwhitlock)

    Hi. Thanks for taking the time to look at this.

    I’ve made a change in the development branch. See commit

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Error: Remote path must be under WP_CONTENT_DIR’ is closed to new replies.