Jump to content

Migrated site - Extended file mapping issue?


MuchDev
 Share

Recommended Posts

Hello there all! So I am excited to say that I am nearing the end of a monumental undertaking (for me at least). I have created a system to display an art galleries inventory to a fancy new processwire site, retiring a 6 year old frame based hand coded php site. I am finally in the process of moving into thier current server from my development server and am hitting a bit of a snag with my recently uploaded images. 

So last week a little birdy told me about using the pagefileExtendedPaths flag for sites that exceed a certain amount of directories as a way of speeding things up in the long run. I set that the other day and continued on my merry way syncing a big batch of new work and everything worked great. 

The problem is though now that I have moved everything over to the new server all of the images that I loaded after I made this change are not being displayed because processwire is trying to grab the images from the wrong path. The working server will pull a link like so:

src="/dg/site/assets/files/0/09/063/allen-43113.550x0.jpg"

That fancy path seems to be a new convention that was introduced after I set this. Here is the new (broken) path for the same image:  

 src="/dg/site/assets/files/9063/allen-43113.550x0.jpg" 

I have tried reloading the database after resetting this, but still no dice. Any insight? Thanks a ton in advance :D



/**
* Use extended file mapping?
*
* Enable this if you expect to have >30000 pages in your site.
*
* Set to true in /site/config.php if you want files to live in an extended path mapping system
* that limits the number of directories per path to under 2000.
*
* Use this on large sites living on file systems with hard limits on quantity of directories
* allowed per directory level. For example, ext2 and its 30000 directory limit.
*
* Please note that for existing sites, this applies only for new pages created from this
* point forward.
*
* #notes Warning: The extended file mapping feature is not yet widely tested, so consider it beta.
* @var bool
*
*/

$config->pagefileExtendedPaths = true;

Link to comment
Share on other sites

Ok, it seems I figured it out. When I looked in my assets/files it turned out that I had about 400 empty folders at the paths that processwire was looking. I deleted all the blank folders, and it figured it out right away. I wonder whats going to happen with new content...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...