Sunday, 12 March 2017

Can’t unpin an Office item from the jump list

I recently ran into an issue with a pinned Excel 2016 document that wouldn’t go away. I’d pinned it to the Excel jump list (on the Windows 8.1 task bar) and despite clicking the ‘Unpin from this list’ icon next to the document itself, it was well and truly “stuck”.

pinFolder

I tried simply unpinning the Excel icon from the taskbar but that didn’t help. I installed Windows and Office updates and rebooted but the document kept appearing.

A bit of searching led me to the AutomaticDestinations folder, which can be safely (?) cleared from a command line like so:

del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*

Copy or type the above as one line into a command prompt.

Note this is likely a hidden folder but despite having Explorer configured to show hidden items, I couldn’t see it within the Recent folder.

This command comes from the tutorial (option 3) at https://www.sevenforums.com/tutorials/81483-jump-lists-reset-clear-all-items.html, which also contains a second delete command for CustomDestinations and suggests logging off/rebooting for full effect. I didn’t need to run this second command or reboot. You may find it helpful if the above delete command doesn’t work on its own in your case.

It’s important to be aware your pinned jump lists for other applications will also be cleared, included Explorer.

Wednesday, 14 December 2016

Windows Update errors: WindowsUpdate_80244019 and WindowsUpdate_dt000

In Windows Server 2012 R2 Windows Update recently decided to stop working and referred me to the WindowsUpdate_80244019 and WindowsUpdate_dt000 error codes.

An answers.microsoft.com thread eventually got to the point and my issue was quickly resolved with an ipconfig /flushdns command at the command prompt.

Monday, 18 April 2016

Enabling Windows File History (aka Shadow Copy on Win 8) without an external drive or network drive

After being hit by a crypto/ransomware trojan, I’m looking at all options to make file management and backups easier and automatic. Shadow Copy is mentioned frequently in relation to the crypto locker virus (…in that the virus typically deletes shadow copies…) so I thought I’d look into this Windows feature. I’ve been after a version history, of sorts, for regular file content for a while so this sort of helps.

In Windows 8, Shadow Copy was renamed File History and is switched off by default. To switch it on, you need an external drive or a network location but that’s lame so I sought a workaround to test the waters and get up and running on an internal drive.

This blog post details the steps to set this up, which basically entails creating a virtual drive in Windows Disk Management, initialising it and creating a simple volume, and then pointing File History (via Control Panel) to that VHD.

This is by no means a bulletproof solution and I noticed the crypto virus that attacked my machine also encrypted my virtual machines so this .vhd would not be immune. But it’s about defence in depth, I suppose.

Although I gave the VHD solution a spin, it’s not for everyone and, most importantly, they’re not attached automatically when you reboot (without a startup script, that is). Instead of the VHD approach, I created a new folder to contain my file history, shared it (granting Read and Change share permissions to my Windows account), and then pointed File History the share via \\127.0.0.1\FileHistory [or whatever you name your share].

Update (a few days on): well that didn’t last. File History very quickly consumed all available free space on my internal laptop drive (a second partition). So I’ve turned it off and am using CrashPlan instead (despite the Java dependency—grrrr) as there was no interface to configure how much storage it uses. File History seems to be yet another one of those inane Windows features that is absolutely useless in real life.

Tuesday, 5 April 2016

Disconnect or remove a website from Google Analytics

To clean up Google Analytics and remove web sites you’re no longer interacting with (e.g. client sites to which you’ve been granted access),  you can simply remove yourself in the User Management screen.

To get there, log in and click on the Admin tab at the top of the Google Analytics screen.

Select the Account you want to rid of from the drop down list in the left column. Then click on the User Management link below.

You should then see a big blue button that says Remove myself from this account. Click it, confirm, and you’re done.

No deletion or trashing of views or properties (but also no undo).

Remove myself from this account

Sunday, 3 January 2016

Change the location where iTunes backups are stored

iTunes annoyingly stores backups on the main system drive (c:\); the backups can get quite large but there seems to be no way within iTunes to set the backup location explicitly.

Scott Hanselman details the steps necessary to create a NTFS junction point to redirect the backup directory to a another drive using mklink but the mklink command only worked when I renamed the /Backup directory in my C:\Users\{user name}\AppData\Roaming\Apple Computer\MobileSync directory to /BackupOld. Prior to the rename, mklink would fail with a “Cannot create a file when that file already exists” error.

The mklink command I used was:

mklink /J "C:\Users\Michael\AppData\Roaming\Apple Computer\MobileSync\Backup" "D:\Backup\iTunes"

Tuesday, 30 June 2015

Enable gzip compression with GoDaddy Linux Hosting (Apache)

GoDaddy’s documentation claims to have mod_Deflate installed by default on all but its Classic Hosting accounts but any basic HTTP sniffer (YSlow or Fiddler) suggests text-based resources like Javascript, CSS, XML, etc aren’t being compressed. Google’s Web Master Tools will likely flag this to you as well and you can use an online tool like redbot.org to inspect your headers.

If you’re not seeing a header like this one, your content is likely not being encoded:

Content-Encoding: gzip
To enable compression on one of the site’s I’m working on, I added this line to the bottom of the .htaccess file at the root of my site:
AddOutputFilterByType DEFLATE text/text text/html 
text/plain text/xml text/css application/x-javascript 
application/javascript
Bear in mind compression is only one aspect of a performant site. Among other things, you’ll also want to ensure your content is cacheable for a suitable length of time. Consider combining and minifying your CSS and Javascript and use a free content delivery network (CDN) like CloudFlare to accelerate the local delivery of your image assets.

If you’re really keen (or suffering performance problems) consider using image sprites to reduce the number of resources a page needs to download and move away from server-side code where you can. The vast majority of your page content is likely static (even if it’s being generated dynamically—but isn’t personalised) and should be cacheable at the browser level.

Tuesday, 23 June 2015

How to increase the size of the shopping cart icon in WooCommerce

I found the default size of the WooCommerce shopping cart icon (in the Storefront theme) was a bit on the small size.

The icon is textual and comes from Font Awesome. Normally, this would be an easy change by adding fa-2x or something similar to the style declaration. Inspecting the CSS in Chrome didn’t offer me such an option (I’m new to Font Awesome) so I added this CSS to the custom CSS in my Storefront child theme:

/* Increase size of shopping cart icon */
    .site-header-cart .cart-contents:after
    {
        font-size: 1.25em !important;
    }
The 1.25em increased the size of the cart icon to better reflect the size of the menu text and stand out better.

Woocommerce Shopping Cart Icon

Tuesday, 9 June 2015

WooCommerce tax not displaying ($0)

Had an annoying little problem with taxes not showing in WooCommerce recently. Despite my best efforts to configure the Tax pages correctly, all I was getting was $0 for taxes. I had specified an address in the checkout but the tax amount would consistently come back as $0. This was on two separate, new installs of Wordpress v4.2.4 + WooCommerce v2.3.10 and I had no other tax plugins installed.

Thankfully, a response to my post to the Wordpress support forums got me back on track. It was suggested I may be missing the wp_woocommerce_tax_rate_locations table in the database, and sure enough, upon inspection I had no such table.

I created the table using the following SQL from another post describing an identical problem:

CREATE TABLE wp_woocommerce_tax_rate_locations (
location_id bigint(20) NOT NULL,
location_code varchar(255) NOT NULL,
tax_rate_id bigint(20) NOT NULL,
location_type varchar(40) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Next, I clicked Save on the WooCommerce/Settings/Tax/Tax Options screen before taxes would show.

Thanks lorro! Read the full thread here: https://wordpress.org/support/topic/tax-displays-as-0

Sunday, 7 June 2015

How to set a product as a featured product in WooCommerce

If you want to mark a product as “featured” in WooCommerce (so it will display in the Featured Products widget, for example), you’ll soon find it’s nearly impossible to figure out how to do so.

There are two ways to set a product as a featured product in your WordPress admin screen:

  1. From the products list
  2. From the edit product page

Products List

Most forum posts, etc will suggest you can toggle a product as featured or not featured in the Products list by clicking the empty or filled star icon for each product. This is easy enough—especially for setting multiple products quickly—but requires you to drop out of the product edit page.

Featured Product Star

Edit Product Page

If you’re setting up a new product you may want to set it as a featured product from within the edit product page. To do so, expand (edit)  the Catalog visibility: section in the Publish widget. The last option is a checkbox to flag the product as a featured product.

Expand Catalog VisibilityFeaured Product Checkbox

You may also want to read the Adding and managing products documentation from WooThemes for more information.

Wednesday, 3 June 2015

Can’t access Wordpress wp-admin after changing the site URL

I’m in the process of pointing a domain root to a Wordpress install that resides in a /wordpress folder below the root. I’m following these instructions—or rather trying to!

I first modified the Site address (URL) from https://store.mydomain.com to https://store/mydomain.com/wordpress, moved (instead of copying) the /wordpress/.htaccess and index.php files to the root, cleaned up those files how they should have been in the first place (!), and then promptly lost access to wp-admin.

I backed up the site content before starting all of this but, naturally, elected not to back up the Wordpress database. Which was a bit silly.

Fortunately, I was able to roll back to the start—without access to wp-admin, by modifying the value of the siteurl row in the wp_options table (in the MySQL database via phpMyAdmin).

This article also has some great options to get you up and running again without modifying the database: http://codex.wordpress.org/Changing_The_Site_URL