Bug Fix: Tagadelic "Undefined index: voc"

The Tagadelic module I upgraded during lunch today invoked an error on the Tagdelic page view. I am using version 2012-Feb-08.

The Errors:

  • Notice: Undefined index: voc in theme_tagadelic_weighted() ...
  • Notice: Trying to get property of non-object in theme_tagadelic_weighted() ...
  • Notice: Undefined index: voc in theme_tagadelic_weighted() ...
  • Notice: Trying to get property of non-object in theme_tagadelic_weighted() ...

To fix this, open up sites/all/modules/tagadelic/tagadelic.module in your favorite text editor. Starting around line 334, change this:

if (count($terms) >= variable_get('tagadelic_block_tags_' . $vars['voc']->vid, 12)) {
  $output .= theme('more_link', array('title' => t('more tags'), 'url' => "tagadelic/chunk/{$vars['voc']->vid}"));
}
return $output;

To this:

if (isset($vars['voc'])){
  if (count($terms) >= variable_get('tagadelic_block_tags_' . $vars['voc']->vid, 12)) {
    $output .= theme('more_link', array('title' => t('more tags'), 'url' => "tagadelic/chunk/{$vars['voc']->vid}"));
  }
}
return $output;

Problem solved. All we are doing here is checking to make sure $vars['voc'] is set before trying to call it.

Disable Firefox's Element Inspector

It is nice that Mozilla decided to include a native element inspector in Firefox. It looks nice, but is not nearly as useful as the Firebug plugin. The first time I used it I thought the Firebug developer(s) went off the deep end. Eventually I figured out what was going on. I was careful to select "Inspect with Firebug" when right clicking. But still, I'd select the dreaded Firefox inspector 5% of the time. Time to disable this bad boy!

  1. Enter "about:config" into the url/location field. No quotes.
  2. Acknowledge that you understand the risks.
  3. Search for "Inspector." Again, no quotes.
  4. Double click on "devtools.inspector.enabled" to change the Value to "false." Alternatively you can right click on it and select "toggle."
  5. You're done!

Disable Firefox's Element Inspector

XSL: Test the Value of the Current Node in a For-Each Loop

I am surprised I have gone this long without having to test what the current node value was while going through a for each loop in XSL. I thought about it for a few seconds, then set up a test=". = 'Plastics'" choose/when statement. I had my doubts that it would work like that, and my hunch was correct. Sure enough, someone at Stackoverflow had the exact same problem. Below are two solutions to the problem.

Long way to do it:

<xsl:for-each select="//*/subject">
    <xsl:if test="self::node()[text()='Plastics']">
        <!-- found it -->
    </xsl:if>
</xsl:for-each>

Short way to do it:

<xsl:if test="//*/subject[. ='Plastics']">
  <!-- found it -->
</xsl:if>

Skyrim: Need Money?

The Forsaken Cave

I'm slowly working my way through the main quest line in Skyrim. All the other major quest lines are finished, but I'm still cleaning up my quest log and picking up odd quests along the way. I was in The White Phial alchemy shop in Windhelm working on another quest when I picked up “The White Phial” quest from the shop keeper. This quest brought me to The Forsaken Cave which is northwest of Windhelm, east of Nightgate Inn.

Why am I writing a blog post about this? Well this cave is full of great loot, mostly gems which are light to carry. I recorded below just what I had in my miscellaneous inventory since I know 99% of it had to of come from this cave. I also looted some good weapons, armor, apparel, ingredients, and soul gems, but I don't know from looking at my inventory what I already had.

The Forsaken Cave starts with two ice trolls followed by a ton of draugr. I don't think this cave would be too hard for a lower level character in need of some septims.

Location: The Forsaken Cave

Quest: The White Phial

Quest Giver: Nurelion, in Windhelm

How to disable specific package updates in Ubuntu

I had this problem with the Ubuntu update manager updating a special patched package I need for work. Usually I was good about un-checking it when running updates, but every once in awhile I'll forget. The times I forget are really annoying because I would have to remove the package and reinstalled the patched version. After nearly overwriting this package again today I decided to add a hold rule to the dpkg status area.

The command to stop Ubuntu from updating a package is:

echo package-name hold | dpkg --set-selections

It's easiest to be root user when running this.

First thing I did was search for the package.

# apt-cache search package-name

Which gave me results similar to this:

package-name - generic package daemon
package-name-dev - generic package daemon development libraries
package-name-doc - generic package daemon documentation

I put a hold on all three packages, for good measure:

# echo package-name hold | dpkg --set-selections
# echo package-name-dev hold | dpkg --set-selections
# echo package-name-doc hold | dpkg --set-selections

That's it! Remember to launch the update manager to make sure the package is deselected by default.

The Elder Scrolls V: Skyrim

The Elder Scrolls V: Skyrim

I picked up Skyrim on release day last Friday (11/11/11). The Elder Scrolls is by far my favorite video game franchise. I played TES: Arena and TES II: Daggerfall back in the day, never to completion though. TES III: Morrowind would be the first Elder Scrolls game that I “played the crap out of.” I know I put at least 100 hours into Morrowind, perhaps over 200. I actually bought my Xbox 360 to play TES IV: Oblivion as it was cheaper than building a PC to play it (I had pre-intell Macs back then). I didn't stop playing Oblivion until I was satisfied that there was nothing left to do, over 200 hours went into that game. At PAX East this spring I saw videos of TES V: Skyrim. I completely missed the Bethesda's announcement in December 2010, so that was a surprise.

So after a week I'm just about 20 hours into Skyrim. The game is definitely an improvement over Oblivion. Bethesda changed how the character creation and leveling works. You still get to pick your race, gender, facial and body features, however instead of picking a class you start off with a blank slate. This means instead of having to level specific skills in your class to level up our character, you can level up whatever skills you want and they all contribute to you character's overall leveling. This means your character will pretty much end up exactly how you actually play him or her, and should adapt as you progress to 100 hours and into the 200s.

Star Trek Online: 10 Days Free

Alienware is giving away 10 day free trials to Star Trek Online. There were still 6,663 Keys available after I finished signing up. I've been interested in trying out this MMO since I lost interest in keeping up with World of Warcraft. STO is moving to a Free to Play (F2P) system by the end of the year. Information on how to get the 10 day key and F2P status are below.

10 Day Signup: http://www.alienwarearena.com/giveaway/star-trek-online-subscription-bundle/

F2P Info: http://www.startrekonline.com/f2p

Xpath Online Tester

This online Xpath tester saved me a lot of grief today.

http://www.xpathtester.com/

Update: Lord of Ultima

I have been playing Lord of Ultima for 3 weeks now. Other than joining an alliance, I have not had any real player interaction yet. The game's progression is painfully slow. I might give it another week before deciding to move on to something else.

LORD: First Dragon Kill

It took 45 days to get my first dragon kill... I was doing really well keeping up with the leaders, then disaster struck. There was a two week period where I accidentally got stuck at level 11, the trainer killed me on my way to level 12. I kept loosing experience to failed player kills and getting killed early in the forest. Then I had trouble saving up for decent equipment once I got to level 12. Had trouble finding fairies. But the other day I got a fairy and robbed the bank, bought a Blood Sword and better armor. Then today another fairy. Survived the forest, then searched for the dragon. For once this round I didn't get one-shotted by the dragon and was able to kill him with the first blow after being resurrected by the fairy in my pocket.

There is already someone with 3 dragon kills, looking like that will change to 4 soon (5 ends the game). This round might not end up being my best, but there is always next round, which I expect to start around Thanksgiving or sooner.

Tags: 
Subscribe to Jeremy Morgan RSS