Magento dev site redirects to live site

When taking a copy of a production site and installing it on a dev server, you’ll need to do a few things for the application to load the dev server and not redirect to the live site.
1. Change the site_url entries in the core_config_data table to match your dev site’s url
2. Delete everything in the magentoroot/var directory
3. Update the app/etc/local.xml file to point at your local database
4. This is the one that usually stumps me for a bit… ensure the magentoroot/var directory’s permissions are opened up (777 the var directory). If this is not done, Magento will write your Magento temporary and cache to the system temp and you magically be redirected to the live site.


Jira: Give user access to one project

Let’s face it, you found this blog post because like me you found Jira permissions to be ten times more confusing than necessary. After a really really long time, I figured out how to give a user access to just one project instead of every project on my account.

1. Copy the default permission scheme to another like “Project-Client-Permissions”
2. Create a group, “Project-Client”
3. Add that group only to the permissions you want them to have. For me, it is Browse Project, Create Issues, Edit Issues, Resolve Issues, Add Comments, Edit Own Comments, Delete Own Comments, Create Attachments, and Delete Own Attachments
4. Apply that Permission scheme to the project
5. Add a user and add them only to the Project-Client group (they should also be in jira-users by default so they can login)
6. One additional step I did – edit the permissions of the default permission scheme and remove “Application Access” – “Any logged in user” from the “browse projects” permission in order to hide other projects from my one project user.


Simple Magento Deployment Script

Here is a quick bash script I created to do a magento deployment. This assumes your magento code is managed by git and you have n98-magerun installed on the server. Run this in your project root like “bash deploy.sh mybranchname;” .

#!/bin/bash
 
echo "creating maintenance file";
touch maintenance.flag;
 
echo "fetching and checking out " $1;
git fetch && git checkout $1;
 
echo "clearing cache";
n98-magerun cache:flush;
 
echo "running installers";
n98-magerun sys:setup:run;
 
echo "removing maintenance file";
rm maintenance.flag;
 
echo "done";

Nginx config for Zend Framework 1

My server is running Ubuntu with Nginx and php5-fpm. I wasn’t able to find a quick drop in config for my zend framework 1 project so I wanted to share what I was able to get working. Also notice nginx is listening to tcp port 9000 instead of the default unix socket.

server {
  listen 80;
  server_name local-mysite.com;
  root /var/www/mysite/public_html;
 
  location / {
   try_files $uri $uri/ /index.php$is_args$args;
   index index.php;
  }
 
  # PHP scripts will be forwarded to fastcgi processess.
  location ~ \.php$ {
   include /etc/nginx/fastcgi_params;
 
    fastcgi_pass   127.0.0.1:9000;
    fastcgi_index  index.php;
  }
}

Magento dataflow import Skip import row, is not valid value “” for field “type”

MerryStockings
I’ve run into this issue multiple times for various reasons when using Magento’s dataflow importer. In my research of the problem I came across https://www.mag-manager.com/useful-articles/case-studies/error-skip-import-row-required-field-not-defined/ that contained many helpful suggestions, but none of those solved the issue. Just a few products were causing this issue during the import on my dev environment. I found out the product did not exist in my older copy of the database, which caused this error. So much for having a meaningful error message :).