WordPressDemo / WP-Demo

1 stars 0 forks source link

Media Not Moved #18

Closed bearded-avenger closed 10 years ago

bearded-avenger commented 10 years ago

When a new demo site is created from the parent site the images in the cloned site are all 404. The images in the uploads directory are not moved with the cloned site.

dovy commented 10 years ago

Good call. @bfintal this should be an easy fix.

bearded-avenger commented 10 years ago

really appreciate it!

bfintal commented 10 years ago

Easy fix? I dunno what you mean by this, haha! :p

dovy commented 10 years ago

Haha. I meant to leave the url rewrites, but you're right. Not easy.

bearded-avenger commented 10 years ago

Thanks Guys. Out of all the issues I've created this one is the show stopper for the time being.

bfintal commented 10 years ago

Hi there, I'm afraid I'm going to need more information regarding this. I tested this and the contents of the uploads folder get copied. Even those just manually placed inside the uploads folder are getting copied over to the new site.

bearded-avenger commented 10 years ago

http://tryaesop.com

You can test and see for yourself here. The images are not being moved.

bfintal commented 10 years ago

Okay found something.

When I upload an image in my tests, I get this. This is an image in my test site:

http://wputmu/test/wp-content/uploads/sites/2/2014/10/image.jpg

After I create a demo, my new site gets this. I see this file when viewing WP's media manager. This is from my new bbbcdb91aa743a2ab28c6b0e site:

http://wputmu/bbbcdb91aa743a2ab28c6b0e/wp-content/uploads/sites/10/2014/10/image.jpg

In your case, WP's media manager is showing these types of URLs:

http://tryaesop.com/1992a6e4cfdd51d5acdc5f18/files/2014/10/logo.jpg

What's the files folder? This won't be copied since it's not the uploads folder of WP. Or am I missing something?

bearded-avenger commented 10 years ago

To be honest I've no idea. This is a standard run-of-the-mill multisite install on Lightning Base. No modifications at all. Other plugins, like Blog Copier, Duplicator, all work with moving the media.

I'll ping the host.

bearded-avenger commented 10 years ago

Spotted this in .htaccess .

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

This is however correct because its a subfolder multisite setup? Does WP Demo support a directory setup? I'll update this once I hear from LB.

bfintal commented 10 years ago

Yup, we recommend subfolders in multisite.

Can you check if files in the wp-content/uploads/sites/xx are actually copied?

bearded-avenger commented 10 years ago

this was indeed a bug on the hosts end. works now. thanks guys.

bfintal commented 10 years ago

Glad it worked out! What was the issue?

bearded-avenger commented 10 years ago

Yep so some Host installers are still installing wp ms in the old way with running uploads through ms-files.php. New MS installs aren't done like this anymore. They had to partially rebuild my install and will fix the auto installer through cpanel.