Wednesday, June 16, 2010

Summer is here (almost)!

Good to see that warmth is returning to the air and its summer time again!
And along with the arrival of summer, it is good see new, fresh and very good templates/themes being made available from blogger!
My previous blog template was good but was breaking and it was time to change it - what a timing from blogger in releasing the new templates!
So to reflect the joy in the air, I have changed the template on my blog to be more cheerful!
If you have a blogger/blogspot blog, do check out the new templates!

With the new template, the Tag Cloud widget stopped working so I had to re-install it. If you face a similar problem, then check out the creator phydeaux3 blog page on this here. Only thing that I did not like about this widget is that it shows the current post also in the list of related posts. I feel filtering it should not be such a big task - I hope the creator can take note of this and implement it at the earliest.

The code was not showing up properly after installing new template - this indicated that the Syntax Highlighter was not working. To re-install it, I referred to the detailed post here.

Apparently, adding the new template broke the Related Posts widget as well, so I had to re-install that as well. Check out the instructions at the the creators' site here.

Note: Please backup your current template locally before doing any such changes. Also you may need to re-install 3rd party widgets as they may not be cleanly supported by these new templates!

Monday, June 14, 2010

Fix Magento Error Message “Exception printing is disabled by default for security reasons”

Sometimes when Magento exceptions out, it gives the message:
“Exception printing is disabled by default for security reasons”
To remove this message, follow the steps below:

Step 1:
Copy the file errors/local.xml.sample and name it as errors/local.xml

Step 2:
Modify the configuration to suit your needs - the xml is very well commented and self-explanatory. For leaving the error log files on the server for future reference as well as email it to the store admin, the config should be setup as below:

<config>
    <skin>default</skin>
    <report>
        <!--
            "action" can be set to "print" to show exception on screen and "email"
            to send exception on specified email
        -->
        <action>email</action>
        <!--
            in "subject" you can set subject of email
        -->
        <subject>Store Debug Information</subject>
        <!--
            "email_address" admin email address
        -->
        <email_address>storeadmin@mystore.com</email_address>
        <!--
            "trash" is handle about trace info
            value "leave" is for store on disk
            value "delete" is for cleaning
        -->
        <trash>leave</trash>
    </report>
</config>

For more Magento debugging tips, check out my article Debugging Magento.

Debugging Magento

Magento some times errors out with the below message which gives no clue as to what might have gone wrong:

There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: XXXXXXXXXX

If you have access to the files on the server, then go to the folder /var/report/ and look for the file named with the above number and open it up - you will see a "stack trace" of the error!

In case you do not have access to these files, fear not! You can enable the printing of the logs on the front-end. Open the file index.php and uncomment line 71 to display the errors:

ini_set('display_errors', 1);

But remember - do not keep this on for a long time as the error messages will be visible to the world.

Monday, June 7, 2010

Rip Audio CDs in Ubuntu

I had an old music audio CD that I wanted to convert/rip to MP3 and then upload to my RockBox-ed Sansa e260. This is quite a simple task if you have the right set of tools with you. Here's how I did it on Ubuntu 9.04.

Here are the steps to get this done:
  1. Install SoundJuicer
  2. Install MP3 Encoder
  3. Setup Sound Juicer to convert to MP3
  4. Convert the Audio CD

Install SoundConverter
You need to install soundjuicer application from the Synaptic package manager. This program does the work of converting between formats and supports WAV, FLAC and OGG Vorbis natively. So for converting to MP3 and other formats, it requires the appropriate encoders.

Install MP3 Encoder
You need to install GStreamer MP3 Encoder (gstreamer-0.10-plugins-ugly) from Multi-Verse link apt:gstreamer0.10-plugins-ugly-multiverse?section=multiverse as mentioned on the SoundConverter website since it is not directly supported by Ubuntu and so may not available from the Synaptic package manager.

Setup SoundJuicer to convert to MP3
Now that our installation is complete, fire-up the Sound Juicer application Applications > Sound & Video > Audio CD Extractor and go to Edit > Preferences menu. Change the Format > Output Format to ".MP3"; Bitrate Mode to "Variable (VBR) - Best Quality; and Quality to High.

Convert the required files
This completes our setup and now we are ready to convert files. Just load the audio CD you want to convert and press the Extract button!

Note: Sometimes if the tracks in the Audio CD do not have any tag info, then Sound Juicer simply crashes. In that case, copy the files from the CD onto a local folder and then follow the steps to convert WAV to MP3 in my post here

Convert WAV files to MP3 in Ubuntu

I had old music files in WAV format that I wanted to convert to MP3 and then upload to my RockBox-ed Sansa e260. This is quite a simple task if you have the right set of tools with you. Here's how I did it on Ubuntu 9.04.

Here are the steps to get this done:
  1. Install SoundConverter
  2. Install MP3 Encoder
  3. Setup Sound Converter to convert to MP3
  4. Convert the required files

Install SoundConverter
You need to install soundconverter application from the Synaptic package manager. This program does the work of converting between formats and supports WAV, FLAC and OGG Vorbis natively. So for converting to MP3 and other formats, it requires the appropriate encoders.

Install MP3 Encoder
You need to install GStreamer MP3 Encoder (gstreamer-0.10-plugins-ugly) from Multi-Verse link apt:gstreamer0.10-plugins-ugly-multiverse?section=multiverse as mentioned on the SoundConverter website since it is not directly supported by Ubuntu and so may not available from the Synaptic package manager.

Setup SoundConverter to convert to MP3
Now that our installation is complete, fire-up the Sound Converter application and go to Edit > Preferences menu. Change the Type of result? > Format to ".MP3"; Bitrate Mode to "Variable (VBR) - Best Quality; and Quality to High.

Convert the required files
This completes our setup and now we are ready to convert files. Just add the files you want to convert and press the Convert button!

Note: that you will need to copy files from the Audio CD onto your HDD before starting the conversion otherwise SoundConverter complains and does not do anything.

Note: If you sinply want to rip an Audio CD, then follow the steps to rip an Audio CD to MP3 in my post here

Full featured hosting for $1.99 per month

For those on the lookout for a good Web Hosting Deal, WebHostingPad.com is now offering full featured unlimited hosting for $1.99/month when prepaid for 4 or 5 years!

For those looking for affordable Linux + Java/JSP Web Hosting, DailyRazor is providing a full featured unlimited hosting including Shared Tomcat for $4.60/month when prepaid for 3 years!
If looking for a regular hosting, DailyRazor is offering a full featured unlimited web hosting for only $2.95/month when prepaid for 3 years.
Use coupon code 15PD for another 15% discount at DailyRazor!

Checking for NaNs

In Sybase 12.5.4, checking for NaN is very simple - just convert the number to a string and check for the string!
select * from mydata where STR(numcol) like '%NaN%'

From Oracle 10g onwards, this is very simple as a special NaN value is made available for checking against:
select * from mydata where numcol is NaN

Tuesday, June 1, 2010

Bagel and Coffee for a Buck plus more food deals

Its always good to see cheap food deals, especially in NYC! So this week Mustang Cafe on 22 W 38th Street between 5th and 6th Avenues has the following deals:
Breakfast
Toasted Bagel with Butter and small Coffee or Tea for $1.
Lunch
Tossed or Chopped Salad with 1 Main ingredient and Unlimited Toppings with Free Small Soup. Small Salad for $6.99 and Large Salad for $7.99.

Enjoy it while it lasts!

Update: As of the week of June 21, these deals are still valid!

Friday, May 21, 2010

Import Products and Categories into Magento

Of the few shopping carts that I was playing around with, I found Zen Cart and Magento to be the best. Simplicity of the Zen Cart was very alluring and Magento was attractive for its features based on the solid framework.

However, for a new store, importing all the products and categories for the initial setup is a major area for complaint. I wonder, how such a simple and important features gets left out of such a thought out & planned product?!

The developer community has provided plug-ins for Zen Cart and Magento Extensions to solve this problem to some extent. However I still feel that the ones available for free are not so well integrated and do not provide a very clean solution. A better integrated & cleaner solution should come in pre-packaged with the cart.

The solution should take care of and provide the following features:
  • Import Category hierarchies
  • Import Product Images & gallery if required
  • Associating of Related, Cross Sell & Up Sell products

*** Sighhh **** well, so much for wishes - for now, use what you get to be as close to the end goal as possible and mash-up the required functionality with it.

Useful jQuery Tips

Recently I have started playing around a bit with jQuery and find it quite amazing. To Quote straight from the jQuery site: jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript


In essence, what this means is that if you are not so good at understanding & writing complex JavaScript, use this wrapper/framework to simplify your coding life! This also implies that using jQuery could be slower than rolling your own library if your needs are limited and you can afford to dirty your hands with JavaScript.


But, since I had decided to play with and use jQuery anyways, I started to look around for good articles and found this very useful article by Jon Hobbs-Smith of TVI Design UK.


Here are a few useful cheat sheets:
The visually best one I felt is (a rather big one at 6 pages) JQuery 1.3 Cheat Sheet by Woorkup.
Another good one with nice details is jQuery Cheat Sheet by Matt Kruse - its available in various formats and for different versions as well!


Be sure to check the comments on these posts for other people's observations and also ensure that you use the cheat sheet appropriate for the version of jQuery you are using!

LinkWithin

Related Posts Plugin for WordPress, Blogger...