Magento News

 

Magento – Local Development on Macs – File Case Issues

I mainly work locally on my Mac. I’ve got a nice LAMP setup, and I love it. Over the last month or two, I’ve run into a couple of file case issues, and we just ran into another one last week, so I figured it was time to address it.

Macs are not case-sensitive. Linux machines are (I think Windows machines are, but I’m not sure.. I avoid use of any Windows machines). So, while I can have a Magento site up and running and working great on my Mac, when I transfer it to the live server running on Linux, things can break if I’m not careful.

Here are a couple examples of issues that we have run into:

Product Image Issues: We ran a product import, which included product images. Everything looked great locally, but when we deployed it to the server, there were loads of missing images. The problem was the case of the image names. There were many discrepancies which the Mac didn’t care about, but on the server, it didn’t match up.

Module Issues: We’ve had a couple different issues with this, but to point out one specifically: One of my block files in the module I was working on was supposed to have a capital first letter of the file name. I ended up creating it with a lower case letter. Again, this worked just fine on my Mac, but when pushed to the server, it was creating odd issues that we couldn’t figure out. There were no errors being thrown to point it out, there was just missing data that was not being displayed on the website. It took a while to figure it out, but I changed the file name back to a capital first letter and then it worked fine.

So, if you are developing locally on a Mac, definitely keep this in mind. I am heavily considering creating a VMWare image of Linux, and running Apache on that for local development to catch any of those issues and not discover those once the website is pushed to the live server.


Magento – Local Development on Macs – File Case Issues

Possibly Related Posts:


 

Leave a Reply