Calendar

May 2013
S M T W T F S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031  

Upgrading Concrete5 5.2.2.1 to 5.6.0.1 using SimpleScripts

I currently run several Concrete5 web sites from my host, Bluehost.com. Typically, I use the SimpleScripts tool to do the typical upgrade maintenance for all of my apps. It’s simple, easy to use, and rarely causes concern. However, this upgrade was a little different. I clicked the upgrade icon and away it went. upon review of the new site, I saw that my site was displaying nothing but blank pages. I couldn’t see my dashboard and no discernible error message.

After some quick looking around, as I hadn’t needed to look through the file system before, I found the “error_log” file sitting in the root installation directory. Error logs are usually an invaluable resource while troubleshooting. This was certainly the case this time around. In the log, I found the following messages:

[25-Sep-2012 07:05:42] PHP Warning: require_once(/home1/source/public_html/site/concrete/libraries/3rdparty/htmLawed.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home1/source/public_html/site/concrete/core/libraries/loader.php on line 30
[25-Sep-2012 07:05:42] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required ‘/home1/source/public_html/site/concrete/libraries/3rdparty/htmLawed.php’ (include_path=’/home1/source/public_html/site/libraries/3rdparty:/home1/source/public_html/site/concrete/libraries/3rdparty:.:/usr/lib/php:/usr/local/lib/php’) in /home1/source/public_html/site/concrete/core/libraries/loader.php on line 30
[25-Sep-2012 07:05:43] PHP Warning: require_once(/home1/source/public_html/site/concrete/libraries/3rdparty/htmLawed.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home1/source/public_html/site/concrete/core/libraries/loader.php on line 30

This was repeated every time the site was loaded. I checked in the directory and found, as expected, the htmLawed.php file did not exist. I copied this file over from a diffferent, working installation and retried. I received a bevy of other errors. At this point, I was getting somewhat frustrated. The support staff was not very involved, a departure from their usual outstanding efforts.

I walked away from my troubleshooting for a few hours so I avoid tunnel vision. With a fresh head, I went through and finally found great support information on the Concrete5 Community. I had started my search there, but never quite found the right terminology to get to the right answer. I knew I couldn’t have been the only person to face this issue. Here is the URL that holds the key to this problem: http://www.concrete5.org/documentation/how-tos/developers/troubleshooting-concrete5-updates/.

It turns out that the SimpleScripts upgrade did not fully complete, leaving the Database and the GUI out of sync. According to the post, I fell under Scenario #1, the Core being newer than the Database.

Scenario #1: Core is newer than the database (and you want finish the upgrade)

In this case, you can run the upgrade script directly from its url in your tools directory:

http://www.your-concrete5-site.com/index.php/tools/required/upgrade

If all goes well, this will update the database schema to match the core. It’s a good idea to make sure you have a copy of the unaltered database hanging around in case something doesn’t work.

Once I completed the upgrade process, my website was restored, up and running, with no issues. Admittedly, this was a simple fix, just a frustrating journey to determine the root cause. I certainly hope this post helps prevent hours of wasted time for others facing this issue. I’ve truly enjoyed the simplicity of Concrete5, I’m just not an expert at this point. I’ll be sure to share any other  gotchas I come across.

Fixing Magento Connect on Magento v1.7

I recently upgraded a Magento store from v1.4 to v1.7. In doing so, the administration link to Magento Connect started throwing a weird error. Once I logged in, it brought me to a page that looked like this:

Mac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.ChromeMac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.ChromeMac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.ChromeMac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.ChromeMac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.ChromeMac OS X  2??ATTR??X?Xcom.apple.quarantineq/0001;4fabe10e;Google\x20Chrome;D30B167B-7520-4A4B-BB90-173681AAF80E|com.google.Chrome

For the longest time, I had couldn’t find any information on how to fix this. Then I came across this link: http://www.magentocommerce.com/boards/viewthread/282891/#t397128

Effectively, once I navigated to this folder of my installation: $/public_html/{yourSiteInstallationFolder}/downloader/lib/Mage/Connect/Command I was able to delete all ._* files and access the MagentoConnect site again.

Cheers!

HP ALM – Determining when a Test Case Instance is added to a Test Set

As mentioned in a previous post, my team has been attempting to generate reporting metrics directly out of the ALM database. One of the issues we were running into was determining when a Test Case Instance (TESTCYCL) has been added to a Test Set (CYCLE). There were many queries put together and tables examined and we finally came up with the following SQL Query that appears to get what we need.  It is as follows:

select AU_ENTITY_ID, MIN(AU_TIME) as [Earliest Date]
from AUDIT_LOG
where AU_ENTITY_TYPE = ‘TESTCYCL’
GROUP BY AU_ENTITY_ID

There are a few issues with this, as discovered through conversations with HP Platinum Support Vendors and HP representatives directly. The prime issue is that, HP ALM, as of version 11, will delete these audit records from the AUDIT_LOG table upon removing the Test Case Instance from the Test Set. If you are looking to determine ‘No Run’ test status counts, this will cause an issue. This has been determined to be a defect in ALM, which has been reported due to this particular effort.

The only workarounds that we have been presented to accurately determine this information is to create a custom field in our ALM project and implement workflow code to populate this field for us. Then we could query off this user-generated field. Personally, I have to believe there is a better way, but we haven’t been able to determine it.

Should HP developers run across this post, I’d recommend adding a set of audit columns to the TESTCYCL, CYCLE, and RUN tables or add a “CREATED” series of records to the AUDIT_LOG table.

Bosco Siting – 8/22/2012

Bosco

Unamused Bosco is unamused.

HP ALM Database metrics

The past week has seen me and my team attempting to create several SQL Queries to pull specific information out of our HP ALM Project databases. Basically, we are looking to pull test case execution and status updates per day and report on our local Confluence installation.

The TESTCYCL table stores data pertaining to each specific test case instance in a project. These records are associated with the CYCLE table, which catalogs each Test Set in the Test Lab. There are several other details, which I will explore at another time.

Since we are looking for status updates, it is very important that we get “No Run” counts. The RUN table captures the data for each test run for each test instance. Each record is timestamped, allowing us to determine the resulting Test Execution Status by date. Once we get that data, we can pivot the information and report the counts by date. However, this doesn’t provide the full picture. Remember: the RUN table captures each test execution.

Since no test execution has happened when you add a test case instance to a test set, there is no record in the RUN table. This means our status counts will not accurate reflect “No Runs”. To account for these “No Runs”, the database assumes that TESTCYCL records with no accompanying RUN records is a ‘No Run’. Simple enough… except…

What we have discovered is that the HP ALM database structure does not allow you to determine when a test case instance has been added to a test set. This means that we cannot easily determine this portion of the “No Run” counts by date. If HP (or perhaps Mercury Interactive) would have included a simple set of audit fields on this table, then we would have been able to finish our reports.

I will provide an update if we determine how to solve this issue fully.

Turn Signals and my Honda Accord

Recently, I needed to perform so minor maintenance on my 2002 Honda Accord. Basically, I had to replace the bulb on my dashboard clock, a relatively simple process.

I pried the dashboard clock out of the console and disconnected the two wiring terminals, so I could easily hold the component while screwing the replacement bulb in. This particular component also contains the hazard light switch. I reconnected the wiring and turned the car on. As expected, my clock is now illuminated again!

The bad news, my turn signals no longer work. Brake lights: fine. Headlights: fine. Flip the turn signal, no signal.

Following this story, it is pretty obvious what the issue was. However, at the time, my mind raced through any number of options. Blown fuses: no. Replace the relay: nope. Then it dawned on me… let’s check the wiring cables on the clock component. I pulled out the component, reseated by connections and confirmed they both clicked firmly into place. I tried the turn signals and they popped right on.

Here is the lesson that I learned: the turn signal operations routes through the Hazard Switch. This was a relatively easy fix and simple problem that caused me a bunch of heartache.

The Zoey Chronicles: A Poem

Daddy’s House, Nana’s House
Daddy’s House, Daddy’s House

Trees are up
Clouds are Down
Trees are up, trees are down.
Clouds are up, clouds are down.

Close you eyes, I’m a do maaaaaagic.

The Zoey Chronicles #2 – The Hungry Dinosaur

Today, I bring you the second story told to me by Zoey.

“The Hungry Dragon”

There was a dragon. He was hungry. What did he eat? Five Dora chips. Five Dora chips that were as big as a car!

But he was still hungry.

Then he ate three fluffy cheese pops.

But he was still hungry.

So he ate a bunny.

He wasnt hungry anymore! He was friendly and smiled a lot.

The End

The Zoey Chronicles – #1 : The Bunny on the Lake

Today, i bring you the first, in what i hope to be a series, of many stories, as told by my daughter, Zoey. Today, she is just shy of 3 years old. I asked her to tell me a story. And this is how it went:

There was a bunny on a lake.
The bunny hopped and hopped. She hopped on the lake so high. So high to the sky.
The bunny got stuck in a tree. She has an owie.
The bunny’s mommy gave her a big kiss and made her all better.
The bunny is still in the tree.

The end.

I hope you enjoyed this story as much as i did. I have to wonder, though, why the bunny is still in the tree. This is a mystery we may never solve.

Converting SQL DateTime to a Simple Date

Just to remind myself at a later date, this is a SQL Query that shows how to strip the timestamp from a datetime value.

Declare @fulldate datetime

Set @fulldate = getdate()

Declare @shortdate smalldatetime

Set @shortdate = convert(datetime,convert(char(10),getdate(),101))

Select @fulldate, @shortdate