Mist Labs Blog

The second part of this Sonata Bundles mini series takes us onto installing the SonataAdmin bundle.  This pretty much follows the instructions in the official documentation but required a few additional steps in order to get it up and running.  The basic process I followed is detailed below.

Step 1 - Update the deps file to install the necessary vendor bundles

Add the following lines to the deps file of your Symfony2 project

[SonataAdminBundle]
    git=http://github.com/sonata-project/SonataAdminBundle.git
    target=/bundles/Sonata/AdminBundle

[SonataBlockBundle]
    git=http://github.com/sonata-project/SonataBlockBundle.git
    target=/bundles/Sonata/BlockBundle

[SonataCacheBundle]
    git=http://github.com/sonata-project/SonataCacheBundle.git
    target=/bundles/Sonata/CacheBundle

[SonatajQueryBundle]
    git=http://github.com/sonata-project/SonatajQueryBundle.git
    target=/bundles/Sonata/jQueryBundle

[KnpMenuBundle]
    git=http://github.com/KnpLabs/KnpMenuBundle.git
    target=/bundles/Knp/Bundle/MenuBundle

[KnpMenu]
    git=http://github.com/KnpLabs/KnpMenu.git
    target=/knp/menu

[Exporter]
    git=http://github.com/sonata-project/exporter.git
    target=/exporter

Read more

In this first part of my mini series about installing and configuring the Sonata Project bundles I will address the prerequiste which is to ensure we have a working Symfony2 project set up and configured.  This will focus on 2 main parts:-

  • The Bare Essentials - Just enough to get it going
  • The Optional Extras - One or 2 nice little touches to help smooth over issues later on.

Hopefully this will be helpful to more than just me :)

Read more

Recently I have started learning Symfony2 (having previously been using Symfony 1.4 and Diem) and I opted to try out the Sonata Project bundles, primarily so I could use the SonataAdminBundle for my CRUD admin interface to allow an easy and quick way to enter data and the SonataAdminBundle had a very similar look and feel to what I was already using.

I had a few issues getting the bundles all working together as the Sonata Project bundles come in 8 parts (all of which can be found at http://sonata-project.org/bundles/) and there were some inter-dependencies and undocumented configuration options which took me a little while to figure out.   I did find it challenging with some of the documentation to get single bundles running by themselves and more challenges (and less documentation) about how to get them all up and running together and had to resort to a lot of Google searches and trial and error methods.

Read more

A colleague of mine pointed me in the direction of a humorous twitter hashtag of the IT variety which, with being a web developer I found quite amusing, especially on a friday afternoon.  The hashtag was for #htmlmovies.

If you've not already guessed, the basic idea is to convey a film is a clever way using html tags such as

<html><head><style>EM{color:#F00;}</style></head><body>The hunt for <em>October</em></body></html>
Read more

I have recently taken on a new web project which is to move an e-commerce website from a custom 3rd party solution over to Magento and before I even got started I hit a road block (you have got to love Magento for that!).  I found that I had to import around 200 product attributes (colours, sizes, etc) from the old online shop to the magento installation and obviously I did not want to enter all these by hand, but where to begin?!

Luckily I came across a post on the Magento forums which details a method for bulk importing product attributes into Magento and although it did not allow me to automate the whole process, it was sufficient for my purposes.

Read more

I wrote an article in April 2010 about VPN Issues with O2 Wireless Box II and it has come to my attention that O2 are now putting firmware version 8.2.7.7 on their routers which is supposed to resolve these VPN issues. Apparently this is not always the case and O2 are no longer downgrading the firmware because it is "fixed" in the 8.2.7.7 version.  Some people are finding it difficult to get any support, and the O2 CD which you can download no longer has the older 7.4.20.4 firmware.

Fear not though... I did a little digging around and managed to located the 7.4.20.4 firmware (RT-585v7_74K4EJ.exe) and I have upload it for you.

Download the O2 Firmware 7.4.20.4 (RT-585v7_74K4EJ.exe) for the O2 Wireless Box

Just remember and disable O2's ability to come in an auto-upgrade you otherwise it will not be long till you are be back to square one.

Read more

Is Auto-Tweeting Bad?

By Chris Shennan | 16th February 2011

Over the few weeks I have taken to reading (yes, honestly I have, and it appears there is a decent amount of worthwhile reading material out there on the web) a few blog entries from SEOmoz, partly because I started to follow SEOmoz on twitter and have been enticed by twitter teasers.

One of the points of thought on a recent blog entry about the unexpected effects of a tweet on search engine rankings suggested that auto-tweeting using tools like auto-tweet plugins for Wordpress or online services such as Twitterfeed were not as effective as promoting the content.

This peaked my attention, especially since I have been using Twitterfeed for several months to feed my blog to twitter and Facebook and I have, on occasion, noticed decent search engine rankings and quick indexing in Google for some of my topics (mainly my Server Backup using Dropbox (A 5 Minute Setup) article).

Thus far I have not been able to determine if there is any more weight given to an tweet that is posted manually rather than a tweet which is posted by an automated service like Twitterfeed but I have come across several recommendation why auto-tweeting services are bad and should not be used.

Read more

Over the last month or so I have been busy migrating my sites from my old shared hosting to a new server in the Rackspace Cloud and it has not been without it troubles. The first site I transferred was my Wordpress blog and after following various resources on setting up Nginx and spawning PHP FastCGI processes I managed to get everything up and running happily... or so I thought.

As it turns out I had followed the guide for spawing PHP FastCGI processes to the letter, and that is where the problem lay.  After a few weeks Wordpress reported there were various plugins that needed upgrading but I could not do the automatic upgrade and I had trouble uploading new files due to the wrong permission being applied.  After some investigation this lead me to realise that I needed to spawn my PHP FastCGI processes as the unprivileged user the files belonged to, and not nginx as in the original documentation.

Read more

You have probably come across this already but I have tripped up over this problem a few times.

If you have fields in the db like address_1, address_2, address_3 then the _ is not removed when using getter/setter methods

Read more

I am one of those people who, despite knowing the risks, fail to make appropriate backups of my work and important data and rely on hope that nothing will go wrong.  Unfortunately I have been caught out on a couple of occasions and I have been after a nice way to backup my data (documents, websites under development, family photos etc) from my home Fedora Core server without me having to really do anything.

I have seen several online backup software solutions, however most have to be configured and managed via GUI applications installed on your computer however as I have been wanting to back up a Fedora Core server which is command line only, this options was not available to me.  A few people suggested Dropbox to me for sharing files between home and work computers and when looking into Dropbox I found that it can also be set up with a service on my Fedora Core server and configured to backup the data on my server.

Read more