Using Chrome search engines for Redmine & Jira

I knew for pretty long time existence of Chrome custom search engines but just now got a huge benefit of it.

The idea is that you can define custom keyword to do a "search" in some website. What you do is you define a keyword "engine" and then when you type "engine keyword" browser will redirect you to custom specified url with substituting %s with your keyword.

Lets see examples.

Secure Jenkins with login/password

After default installation of Jenkins CI ( admin UI is accessible by everyone.

Multiple AJAX forms on same page

Today I have had very interesting case with drupal forms having #ajax buttons. One form was working but the other didn't. After some debugging on ajax.js file I have found out that ajax submit buttoms behaviors being attached to forms by id so it is critical that different buttons have different id's. And in my case I have named submit buttons the same name $form['submit'] and in this way they had same id "form-submit". So in order to avoid that only thing you need is to make keys of submit elements in form to be different and then box ajax submission behaviors work as expected.

Panels taxonomy arguments

I have discovered very very nasty bug lately. When you export the panels page and it has taxonomy argument. Settings of argument do have machine name of the taxonomy vocabulary but it ties up to vocabulary id. This means that your panels page can break pretty easy in case you will happen to have your exported vocabulary to have different id. This may happen pretty often if you use features extensively for example when develop project in 'code-driven' way. ticket

Debug backtrace

Devel is a great module that provides a lot of helper funcitons to debug your code. One of them I have discovered lately is ddebug_backtrace(). It gives very nicely formatted backtrace as a message. Great help for development!

Debug Symfony project in NetBeans

I am using vagrant box for developing the project on Symfony ( Locally my webroot files folder mounted at /home/ygerasimov/vagrant/puphpet/puphpet.

In order to debug the project in NetBeans we need to set up folders mapping:

Server path: /var/www/puphpet -- this is folder on the vagrant box where my site is

Project path: /home/ygerasimov/vagrant/puphpet/puphpet -- this is where project folder is mounted on my local machine (host)

Custom user name from profile

Current project I am working on has user profiles using profile2 module. So it is pretty common task to replace all links/references on the site with user's proper name from Profile instead of his drupal username.

This is really easy to achieve using hook_username_alter()

Install Drush with Puppet

While working on creating Vagrant profile for one of our projects that requires CentOS I have found out that most of puppet drush recepies use drush debian package that of course is not available on CentOS.

The workaround is to use The snippets are:

In Puppetfile (I am using

Practical Functional PHP

There are a lot of articles on internet about functional PHP. There is very nice presentation about it that was held in Munich.

I was thinking about applying techniques to every-day coding and came up with two quite useful examples.

Drupal 8 and Symfony

We all know that Symfony is already in the core of Drupal 8 but how it works and how both systems work? Not that many people understand fully this integration. Me neither but I would like to pubilsh my research notes about how Drupal 8 works now. Surely this material is based on the snapshot of beginning September and I really hope that more things will happen so this information is relevant only for some time.

I don't have any real life experience of the building projects with Symfony so my knowledge is very close to majority of drupal developers.

So lets start.