Titanium Backup won’t write to SD Card

If you are running Android 4.4 KitKat or higher (Lollipop or Marshmallow as well) you may have run into issues with Titanium Backup not being able to use the SD card to store backups.

Simple solution. On the SD card in Android/data ensure a folder exists with the name com.keramidas.TitaniumBackup and use it.

Writes to the SD card in 4.4+ have been restricted to the app’s folder. There are other work arounds but this one is the simplest.

Magento Sitemaps, Cron Jobs and Migraines

Last week I was asked to product a new set of sitemaps for our Magento store.

I logged into the Magento Admin panel, navigated to Configuration > Catalog > Google Sitemap, updated the time under Generation Settings and  clicked Save Config. Task complete or so I thought.

After the time had passed, I logged into the server and verified that the sitemap file was a week old. I deleted the file, repeated the steps and check again. No file was created.

This is when I thought to check the timezone for the site (Configuration > General > General under Locale Options). Sure enough, it was two hours behind us.  So, once again, I repeated the steps, putting a time in two hours from now. Still no file.

Time to pull out the big debugger (Yeah, I’m not sure what that means either).

I soon realized that several parts of Magento are at play here. First, in defining the sitemap settings the first time, the location and name of the file are committed to the database and don’t appear to be surfaced in the admin panel. You can find/edit them in the table SITEMAP. The SITEMAP_TIME column indicates the time it was last generated.

Secondly, Magento’s cron settings define the building of a task list at regular intervals for the next number of minutes (Configuration > Advanced > System under Cron). If you aren’t scheduling your sitemap generation far enough in advance, it won’t be picked up. You will also want to set the Success History Lifetime and Failure History Lifetime to a long enough period to diagnose issues. If the log is purged too soon, it can’t help. I’ve set ours to 1440 (one day in minutes).

Pop open the CRON_SCHEDULE table to see what is happening. Every x number of minutes, as determined by your Generate Schedules Every setting, you should see new rows appear in your CRON_SCHEDULE table. Look for the ones with JOB_CODE set to sitemap_generate. If you aren’t seeing new rows appear there, odds are your crontab isn’t set to call Magento’s cron script.

Keep in mind, there are three possible time settings involved. The timezone for your Magento install, the time recorded in CRON_SCHEDULE and SITEMAP tables are UTC time and if you are checking the file timestamps, they are in your server’s timezone.

Everything makes a certain amount of sense now but when you are dealing with several timezones and multiple components, it can be a little confusing until you understand how everything plays together.

Nano Shortcuts

After recently transitioning from Windows to Linux (Debian specifically), I find myself having to relearn everything that has been second nature for way too many years. Simple tasks have become complex but I’m gradually figuring things out.

Today’s exercise in frustration was when I needed to paste text copied from a webpage into a document opened in Nano. Ctrl-V or ^V takes you to the next page…clearly not what I wanted.

After a little Googling, I discovered, Shift-Ins does the trick for pasting into Nano.

Changing the products-page slug in WP e-Commerce

So you’ve added a pile of categories and products to your new store and then you notice the products-page slug in the breadcrumb trail and url.

Simple fix, right? Go in and edit the slug on the Products page. Back on the main site, clicking on a category results in a 404. Oops.

After hitting Google, there are a couple of old responses and the options aren’t in the same place. What should we try next?

The answer is remarkably simple. Under Settings > Store > General, toggle Use Hierarchical Product Category URL and Save Changes. You can then go back in, toggle it back and Save Changes again.

Links rebuilt and no more 404.