-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uplaod problem /uplaod/sites/136/sites/136 #153
Comments
Well, We dint have this problem until version 1.8.1, Up until plugin version 1.8.1 - when we create a network, the upload path was left blank and all uploads by default gets uploaded to the respective folder in wp-content/uploads/sites/sitenunmber". We upgraded the plugin to 2.20 like in April of this year and created like 5 networks and all have upload path set to wp-content/blogs.dir/*no" or wp-content/uploads/sites/"no"/sites/*no" Possible to get it working as like in 1.8.1, to leave it blank and by default gets uploaded to wp-content/uploads/sites/? Thanks, |
So I can confirm this is newer behavior. For a while there it was putting files into the blogs.dir folder but now it appears as though it's putting them in both? Actually not sure how or why. It has to do with how it's writing the settings file for the new networks multisite. This should be marked as a potential bug |
@JJJ On a bare bones test install, the paths are set correctly with the removal of these lines. It seems that WordPress itself handles adding I'm unsure what the consequences of changing the behaviour on existing multi-network installs might be - but for fresh ones, it seems those lines can be removed. |
A follow up note regarding WP-CLI@JJJ Even when the paths fix above is applied, creating a new network with WP-CLI results in the new network defaulting to the use of
IOW, replacing these lines with something like: $clone_network = $assoc_args['clone_network'];
if ( empty( $clone_network ) ) {
$clone_network = get_current_site()->id;
}
$network_exists = get_network( $clone_network );
if ( ! $network_exists ) {
WP_CLI::error( sprintf( "Clone network %s doesn't exist.", $clone_network ) );
}
$options_to_clone = false;
if ( ! empty( $clone_network ) && $network_exists ) {
if ( ! empty( $assoc_args['options_to_clone'] ) ) {
$options_to_clone = explode( ',', $assoc_args['options_to_clone'] );
} else {
$options_to_clone = array_keys( network_options_to_copy() );
}
} This also fixes what looks like a bug in the current code where |
The upload folder adds another layer of "/sites/foldernumber" For example /wp-content/uploads/sites/136/sites/136/2019/. Instead it should be simply /wp-content/uploads/sites/136/2019/
Please fix.
Thanks,
Sudeer.
The text was updated successfully, but these errors were encountered: