[SOLVED] Network Error in Google Chrome on installing extensions

This is an issue that was occurring quite repeatedly. At first, I was able to install Extensions and Add-Ons to Google Chrome. However, at a certain point, no matter what extension/add-on I tried, it failed with the following message:

An error has occurred, NETWORK_FAILED

It did not matter whether I cleared my cache and cookies (forever). I tried using Incognito tab as well. Still no luck.

After trying all the suggestions (short of uninstalling and re-installing Google Chrome), I stumbled upon this sequence of steps :

1. Go to “run”. (after you click on the Start button in Windows)
2. Type in regedit.
3. Click on the arrow on “HKEY_LOCAL_MACHINE”.
4. Click on the arrow on “Policies”.
5. Click on the arrow on “Google”.
6. Click on “Updates”.
7. Double-click on “UpdateDefault          REG_DWORD           0x00000001
8. Make sure it is on “Hexadecimal”.
9. Change your “Value data:” to 1.

Voila! That one registry change did the magic. I do not recall whether or not I had to restart after these registry changes. I should also mention that Google Chrome updates were failing because of this. Even when I tried to update Chrome using the Settings menu ->About, it would fail without any fail code.

I hope this helps someone!

[SOLVED] Unable to login to WordPress after WooCommerce upgrade

If you are having an issue logging into the WordPress Admin for your site, read on. Specifically, it seems that the WordPress login authentication completes. However, there is a redirect loop which is cyclic and recursive, so the browser eventually gives up.

My Environment:

  • Shared hosting based on LAMP
  • Static Cache, Dynamic Cache (varnish) and memcached enabled
  • WooCommerce along with a bunch of other useful plugins including Yoast SEO, Google Analytics by SEO, Revision Control, AKismet and a few others.
  • Theme: WooCanvas by WooThemes


A couple of days back, a new version of WooCommerce was available. Thinking nothing of it, I just clicked the upgrade button on it. I like to keep everything updated to avoid zero-day exploits. The upgrade seemed to complete successfully without any noticeable issues.

The following day, I logged into my hosting account and noticed I was using the Google PageSpeed module for caching. With my host, if you enable Google PageSpeed, it disables all the other 3 kinds of caching mechanisms. These caching mechanisms are Static Cache, Dynamic Cache and memcached. All 3 of these caching schemes are at the hosting interface. I should mention that the site is hosted at Siteground.

Caching (at hosting server)

When I noticed that Google PageSpeed was not giving me acceptable speed, I decided to disable it and re-enable the 3 Siteground provided caching schemes. I enabled Static Caching, Dynamic Caching (varnish) and also memcached. From what I understand, memcached stores the dynamic database related objects in RAM to avoid database server latency.

Little did I know that this would cause me huge trouble. Specifically, I was unable to login to the WordPress Admin of the site after I did this. At the time though, I did not know that enabling “memcached” had somehow led to this lockout.

Redirection after login

Specifically, I was being redirected from any Admin page to the ‘wc-about’ page within WooCommerce Admin. I used the FireBug console to determine as much. The redirect however would not work and the browser would give up after a few times of constant redirect. I believe it was an endless redirect loop.


At first, I logged a ticket with Siteground to determine what had caused this disruption. As usual Siteground responded promptly (a good thing). However, their response was not exactly helpful. They said they had tried several different things, but nothing worked. This included renaming the “plugins” folder, disabling all the plugins, reloading stock .htaccess. I should also clarify that the site itself was totally operational from the front end. There were no issues at all browsing the front end of the site. It also loaded a bit quicker now that all 3 caching schemes were enabled.

As disappointed as I was with the response from Siteground, I was determined to get to the root cause of the issue. After a couple of hours of trying a few different things, I finally narrowed it down. It turned out that if I disabling the “WooCommerce” plugin, the problem disappeared. This was consistent because the “wc-about” page is a WooCommerce Admin page. It made sense that WooCommerce was somehow tied into the equation.

The next step however was not so simple. I stumbled upon the caching setup once again. This time, however, I only disabled memcached. Voila! That seemed to fix it.

Possible memcached conflict/interaction with WooCommerce upgrade

At this point, I believe that there is some play between enabling memcached on a newly upgraded WooCommerce plugin. Somehow, the upgrade process did not complete fully maybe? I do not recall if the “wc-about” page was displayed after WooCommerce was upgraded. Once I disabled “memcached“, logging into the WordPress Admin, I was greeted immediately by the “wc-about” page.

I hope this helps someone who is locked out of their WordPress Admin after upgrading WooCommerce. Who knows if this could have happened while upgrading any other plugin as well?  Let me know if you have seen this issue.

Q & A with Chris Christoff on WordPress ecommerce

This past Saturday (October 4, 2014), I attended WordCamp Tampa.  While there, I took up Chris Christoff‘s offer to answer any ecommerce related WordPress questions. Chris was kind enough to clearly explain all his answers. For that I am very appreciative. I hope Chris is a speaker at more WordCamps. Even though I could not attend any sessions in full, the 40 minutes Q & A with Chris made this a most productive WordCamp for me! Here is the summary of my questions and answers by Chris:

Q1. I use WooCommerce. Sometimes, I have product(s) whose layout I would like to change. i.e. the default layout from WooCommerce does not apply well to these products. How do I change the layouts of these certain products in an upgrade-safe way?

A1. First make a child theme. Copy the content-single-product.php inside the child theme. inside the content-single-product.ph”, check using Conditional Tags if the current product requires a special layout. For checking, you can use a category slug or the Product ID itself.

If the Product does require a special layout, place those layouts within the “if” clause.

NOTE: If you have only a handful of products that require this layout, it is acceptable to use this “if” approach. However, for more products, it is advisable to use a “switch … case” construct. Within each “case” clause, “include” the PHP file that contains each product’s layout definition.

If WooCommerce changes the “Add To Cart” function name, check your theme to make sure function names are named correctly. This is very rare and unlikely.

TIP: Use git to look up the differences between your theme and the one that WooCanvas is about to release. You can simply place a copy of your current files and compare with the latest WooCommerce version of those files.

Q2. I  have an IFRAME from an external site that allows the visitor to customize a product. When different options are selected, the jQuery script will change the product’s appearance. Is there a way to simply retrieve some output (price and options) from this script and pass them on to WooCommerce to “Add To Cart” this custom product?

A2. Since its an external script that does not output anything, nothing can be extracted from this script.

Instead, Chris suggested to compile the pictures of all the permutations/options.  (Use amazon mechanical turk for downloading all the images). Use those images as attribute images. This way, this product can be easily defined as a Variable product with all the different options. In other words, do not use the IFRAME because it can not be “Add”ed to Cart.

Q3. In WooCommerce, we have products with Variations. Say for example, a Product has 3 colors and 3 sizes. That makes 9 different combinations. The picture of the Small, Medium and Large combinations is the same. i.e. no different picture is required for combinations that are of the same color. How do I assign the same picture to combinations of the same color without repeating it 9 times?

A3. First step, do not “link all variations”. Instead, click on “Add Variation”. Select the Color, then select “Any Size”. Then load the picture for that color. This way, you only upload the picture for each color just once. (versus 3 times, for each of the Small, Medium and Large sizes).

The downside with this approach is that you can not have differently priced Size based options. You can not specify Stock for the Small vs Medium vs Large either.

Q4.Speeding up WooCommerce. Tips?

A4. Caching. Host provided caching is the best. Send a ticket to let your host know that we are using WooCommerce. This way, they can exclude Checkout, Purchase Confirmation and My Account Page.

Look into Amazon cloud front for caching/CDN solution. Also for CDN’s, Chris’s recommendation was MaxCDN or Amazon S3. CloudFlare did not have high marks.

A surefire way to speed up the site is using hosting that use SSD drives instead of SATA. Additionally, Memory Caching at host can make a major impact. Recommendations Digital Ocean or Liquid Web. CloudFlare not recommended. Amazon or Max CDN is recommended.

Q5. Checkout page customization

A5. Copy the checkout page template to the child theme and then make changes. This way, the changes will be upgrade-safe.

Q6. For cross sells to show on single product:  I would like to show related products for certain products.

A6. Call woocommerce_cross_sell_display() inside the single-product.php

Q7. If we want to write a plugin for product attributes so that all products with no default attributes should automatically have some default, what would be the best way to go about it?

A7. This has been debated internally several times before.

Look at the Core code in wordpress inside save_post(). Check if a product has attributes. If it does have default attributes, no change. Otherwise, update the meta data for that product to assign default attributes.

That is all the questions I had. If I meet Chris again, I will ask him more questions. He is the most enlightened WooCommerce expert I have ever met!


[Fixed] Infinite Redirect after switching WooCommerce site to SSL

According to Google’s Webmaster Blog, they are going to consider HTTPS as a ranking signal.  With this announcement, it becomes important that site owners switch their entire site to HTTPS.

If you already have SSL on all your pages, you do not need to do anything. However, I had a case where only the Checkout and Account pages were SSL protected. The rest of the site was not SSL protected.

I embarked on the journey to convert an e commerce site to HTTPS on all pages. Doing the conversion itself was easy. I used this guide to transfer the site to HTTPS.

However, the problem was I was receiving the dreaded infinite redirect message from Chrome. Initially, I thought it was a local browser cache issue. That was not the case. Digging deeper using Google Chrome’s FireBug tool, I determined that the http://www.example.com was redirecting to https://www.example.com. In turn the latter would redirect to the former. This 2-way ping pong redirect would continue for about 3 or 4 times before the browser gives up and announces failure.

I found the issue was a non-trivial (in hindsight) setting under WooCommerce. Go to WooCommerce->Settings->Checkout->Force HTTP when leaving the checkout

Make sure that setting option “Force HTTP when leaving the checkout” is Unchecked.

When this option is checked, it will redirect all non-checkout pages to http. There lies the problem. The 301 site-wide redirect for http:// to https:// was conflicting with this WooCommerce setting. Each was reversing each other out, hence the infinite redirect.

I had posted in multiple online groups but never received a proper response, so I hope this helps someone.


WordPress Meetup PBG Re-cap

This is my first meetup for this meetup group.  Carolyn Lee of Palm Beach SEO was kind enough to share her thoughts on links.

Link Building Takeaways:

1. Title Tags are the one of the most important factor among SEO factors.

2. Meta Description tags are considered important as well. Meta Keywords tag can hurt.

3. Header Tags – Make sure you have the hierarchy intact. Do not have more than 1 H1 Tag.

H1 – Title of the Page

H2 – What’s on the page

4. Optimize images; alt tags, keywords in the title and filename.

 Favorite Plugins

TinyMCE Editor

Genesis Theme