Plugin Author
Tim W
(@timwhitlock)
Is the remote path under WP_CONTENT_DIR?
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.
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