Seeing as Drupal.org is moving to git soon, I figured I would switch from bzr to git too. I still use SVN for some clients, but all my own stuff was under bzr.
I didn't want to lose my commit history, so I searched around and eventually found a way to convert it to git. I am on Windows 7, so I installed cygwin 1.7.7 to get a linux commandline. During installation I selected both bzr and git.
- Afterwards I went into cygwin, and changed to the C:\cygwin\lib\python2.6\site-packages\bzrlib\plugins\ directory.
So the next step is bringing in the product nodes. As I mentioned in the company node migrate post, I have some custom text fields with taxonomy terms in them, as well as a regular taxonomy, and a node reference field (for the company that makes the product).
The custom text fields' data and the regular taxonomy terms must get moved into new Content Taxonomy fields. The node reference must have its node id number updated to get the new company node id.
Quick post to show you how to move your Drupal 6.x imagecache presets to a module. This is for imagecache-6.x-2.0-beta10 or higher.
Create your presets in Drupal. Once they're all done, go to the ImageCache list page and click the export link next to the first preset. Copy the code presented to you, and paste it into your module using a function called hook_imagecache_default_presets(). Add a
return $presets at the end of the function and save the module.
After importing taxonomies and users, now I need to bring in the actual nodes. First thing to do is remove the primary key option from the node table's vid field. Remember, Table Wizard only works when the table has a single primary key.
Alright, so the things that need to be updated during the migrate are the taxonomy terms for each node, any node-reference fields (user-reference fields are fine as-is because we simply copied the existing user base to the new site), and our meta tags from the nodewords module.
Well, it looks like the users are pretty simple to do. Just overwrite the Drupal 6 profile_fields, profile_values, role, users, and users_roles tables with the Drupal 5 ones. No need to do any importing (which would have been pretty complicated with all the profile values in there).
Couple of things to watch for though:
This will be the first in a few posts on how I am trying to move data in a series of Drupal 5 sites to one Drupal 6 site.
Gee, what happened to 2009? I have been so busy with other things, this website has definitely been lacking some attention. Heck, its still running on Drupal 5! Now that Drupal 7 is in alpha release, I guess I better start work on upgrading this baby to D6 (or maybe I'll just wait until 7 gets released - procrastination 101).
Here's a couple of cool modules/themes that I have discovered in the last little while, and that I now use on most sites I build:
OK, that's it. I've had enough of those damn comment spammers. Its not bots anymore, unless they've figured out a way to beat the random word Captcha, which is highly unlikely. So, most likely, its some #^@%$#^ getting paid to do this. The only way to stop these morons, is to not allow ANY URLS in a comment. So don't even try posting a link, as it will immediately get marked as spam. Sorry to everyone else, but I'm just tired of these people. Until someone invents a way for me to push a button and blow them all to hell and gone, this is the way it has to be.
On a client's site, the Post Preview option is turned on to reduce the amount of bad posts. However, as an admin, this is a real pain - I hate having to Preview first and then Submit. So I did some digging and found out a couple of other people are also interested in a solution. A chap by the name of Markus Petrux has even released a small module (for 4.7) that allows certain roles to bypass the forced preview. You can select which roles in the Access Control page. His module can be found here.
I am writing this as a warning to everyone who owns a domain and doesn't want to get ripped off.
There is a company called The Domain Registry of Canada (DROC) that does something called "domain slamming". What they do is send domain owners a letter saying that their is going to expire soon and to avoid losing it they should renew it immediately. If you do, you actually transfer your domain to them, and end up paying 5 times more for your domain. They charge $40 per year for a .com, but you can easily find it for around $8 elsewhere.