I ran into some interesting issues with Visual Studio and figured in order to quash this bug I should make sure that all my plugins/extensions were all up to date. In doing so, I discovered that I was missing VS2013 Update 3. How could that happen? Well, I clicked the button to update and it downloaded a copy of VS2013.3.exe via Chrome (my default browser).
Upon clicking on the downloaded file, I was greeted by the following error:
Searching for the error “Windows Compatibility mode is on. Turn it off and then try Setup again.” returned quite a bit of wasted time investigating and trying possible solutions. Most involved setting up compatibility settings for an uninstaller, not an installer.
Well, out of frustration, rather than launching the executable from within the browser, I tried to run it directly from downloads folder (first using “Run As Administrator” and then, to check, just opening it via normal click) and voila, problem solved..
Hopefully this will help some other programmer from wasting a good deal of time trying to figure this one out. Not sure WHY it happened this way but this is a quick and easy fix.
Category: Software
Moving Drupal 7 to WordPress 3.3
Having to move data from Drupal 7 to WordPress 3.x is not as easy as I had hoped it would be. Initially found a plugin that didn’t work. Then found a project on GitHub but it was for Drupal 5 or Drupal 6 (not sure really) but the jump to 7 comes with enough schema changes that the above wasn’t going to work.
While not a perfect script, this certainly did give me the ability to move articles/posts/pages from a Drupal 7 site to a current WordPress site. You’ll find the original article at http://fuzzythinking.davidmullens.com/content/moving-from-drupal-7-to-wordpress-3-3/
I made some changes here and there to accommodate the vagaries of the original database I was working with and to correct the types of quote marks used for data fields but other than that, it worked pretty well. If you need access to it, here’s the details (in case his original post disappears):
AS ALWAYS, BACK UP YOUR DATABASES FIRST!
#Run these in blocks and remember to change wordpress to the name of your wordpress
#database/schema and drupal to the name of your drupal database/schema.
#
# Block 1
# TAGS
# Using REPLACE prevents script from breaking if Drupal contains duplicate terms.
REPLACE INTO wordpress.wp_terms
(term_id, `name`, slug, term_group)
SELECT DISTINCT
d.tid, d.name, REPLACE(LOWER(d.name), ' ', '_'), 0
FROM drupal.taxonomy_term_data d
INNER JOIN drupal.taxonomy_term_hierarchy h
USING(tid)
# INNER JOIN drupal.term_node n
# USING(tid)
WHERE (1
# This helps eliminate spam tags from import; uncomment if necessary.
# AND LENGTH(d.name) < 50
)
;
INSERT INTO wordpress.wp_term_taxonomy
(term_id, taxonomy, description, parent)
SELECT DISTINCT
d.tid `term_id`,
‘post_tag’ `taxonomy`,
d.description `description`,
h.parent `parent`
FROM drupal.taxonomy_term_data d
INNER JOIN drupal.taxonomy_term_hierarchy h
USING(tid)
# INNER JOIN drupal.term_node n
# USING(tid)
WHERE (1
# This helps eliminate spam tags from import; uncomment if necessary.
# AND LENGTH(d.name) < 50
)
;
#Block 2
INSERT INTO wordpress.wp_posts
(id, post_author, post_date, post_content, post_title, post_excerpt,
post_name, post_modified, post_type, `post_status`)
SELECT DISTINCT
n.nid `id`,
n.uid `post_author`,
FROM_UNIXTIME(n.created) `post_date`,
r.body_value `post_content`,
n.title `post_title`,
r.body_summary `post_excerpt`,
n.type `post_type`,
r.entity_id `rid`, <- There is an issue here. Haven’t had a chance to fix this yet.
IF(n.status = 1, 'publish', 'private') `post_status`
FROM drupal.node n, drupal.field_data_body r
WHERE n.vid = r.entity_id
;
#Block 3
# POST/TAG RELATIONSHIPS
INSERT INTO wordpress.wp_term_relationships (object_id, term_taxonomy_id)
SELECT DISTINCT nid, tid FROM drupal.term_node
;
#Block 4
# Update tag counts.
UPDATE wordpress.wp_term_taxonomy tt
SET `count` = (
SELECT COUNT(tr.object_id)
FROM wordpress.wp_term_relationships tr
WHERE tr.term_taxonomy_id = tt.term_taxonomy_id
)
;
In my case, I ended up not running the taxonomy or the comments commands as we didn't have any comments to worry about and the taxonomy failed hard.
Either way, thanks to the writer at this blog post for pointing me in the right direction so I could stop wasteing time getting this data converted.
Google Apps
What is Google Apps?
Google Apps is a cloud-based productivity suite that helps teams communicate, collaborate and get things done from anywhere and on any device.
Dispatch FTP Client for Visual Studio Orphaned
While moving over to Visual Studio 2013 recently, I discovered some very sad news... Dispatch, a plugin for Visual Studio that offers enhanced FTP support for Visual Studio has gone offline. Hopefully someone will chime in with suggestions, solutions or an update on this great piece of software.
IIS7 and 530 User cannot log in, home directory inaccessible
Like many others (as evidenced by the various posts and searches on this topic), I do this infrequently enough that it has come up and bit me in the a** too many times so hopefully by memorializing my idiocy in blog post form, I will NOT forget this lesson I learned when managing FTP users in IIS7.
If you an experienced IIS manager (6.x and better) you are most likely to get caught by this. You’ve probably done all the normal steps (added users to Windows, added to correct group, given write access to the correct folder) and yet nothing seems to work for you on this new users… Well, if when you’ve logged in using the corect username and password and still get the dreaded “530 User cannot log in, home directory inaccessible” message, then this should resolve your problem.
If you go to the virtual directory you are looking to allow access to in IIS, make sure that you go into the “FTP Authorization” and create a rule for this user.
Powershell Backup to S3 Script
Have you ever used Powershell? Well, neither have I. Until recently I’d been happily scripting my server maintenance routines in batch files (I know, I know) but figured when one of our dev servers turned out to need to be a Windows Server 2012, I found that my tried and true batch files would need to be massively rewritten so I figured, time to dive into PowerShell.
There were three aspects of what the routine that I needed to address
Add Google+ Comments to a WordPress Blog
Recently, the Google Operating System posted instructions on how to Add Google+ Comments to Any Website. Well, I tried it right off the bat on a WodPress site will no luck. Took some hacking around but I finally found a good way to make this work in a WordPress theme where it was OUTSIDE the loop:
<script src="https://apis.google.com/js/plusone.js"></script> Read more
Make Sure WordPress Has Enough Memory
I’ve just wrapped up spending an inordinate amount of time trying to debug a problem with some client sites that were hosted on WestHost. These sites are cookie cutters in that the theme and the plugins are the same as was running on other hosting companies (BlueHost, HostMonster, HostGator, iPage, etc) but on this new (to me) hosting company, whenever I’d go into the Pages administration of the WordPress dashboard, it would throw a 500 server error.
Turning on debug in wp-config.php would show errors talking about deprecated functions but nothing that SHOULD throw the 500 server we were experiencing. What was odd was that one of the affected plugins was WordPress SEO from Yoast; the irony being that the only reason I went to WestHost was becuase of the recommendation by Joost de Valk himself (owner/developer at Yoast). All the affected plugins were:
Allowing WWW and Domain Only Access to WordPress Site
Say you have a client who’s come to you to build them a new website; great, congratulations. You do some research and find out that the links on their old site all pointed at the raw domain (no www preceeding it). You’ve also decided that based on their needs, the new site should be set up on the WordPress platform.
Easy peasy, right? Well not so fast there… Let’s say you built the new site, took it live and everyone on the Internet can see the new site BUT your client. More accurately, your client can’t see the site when they are at work but can from any other location. Hmmm…
Access StoreId from Codebehind in AspDotNetStorefront
If you’ve ever worked in the codebehinds of the latest versions of AspDotNetStorefront, you’ve probably run into this problem before. Or perhaps you’re smarter than me and already knew this in which case, this isn’t for you. 😉
With the new Multi-Store feature in v9.x of AspDotNetStorefront, there are instances where you need to access the StoreId for one reason or another. The problem is, none of the available classes (this, order, page, etc) seemed to be exposing this value. You could look at this.SkinId but this is not an optimum solution since you can add multiple stores to the same Skin.