Debugging

  • By nidhi.sen on May 23, 2013 - 17:11
  • Debugging
0

As a drupal developer, there were times when I was stuck at some point. At these times, 'devel' module came to my rescue. There are many debugging functions provided by devel. Those are dpm, dpr, dvm, dvr etc. Here, I am going to explain 'dpr()' provided by devel module.

Continue reading
  • By anoopjohn on April 29, 2013 - 14:51
  • Debugging
0

In Drupal 7 Image module offers an image field which makes available an image widget for file fields that can be added to content types. This will allow for upload of images to the image field which can then later be processed by the image module and be presented using the different image styles as configured. This means that image module should have the ability to process files uploaded using this field.

Continue reading

We were testing our newly implemented modal popup for a login functionality. It was working pretty good in Firefox, Opera, and Chrome but not in IE8. When attempts to login by clicking on a login link the login modal was not appearing in IE8. Firebug said nothing, but jquery-1.7.2.min.js in IE showed the following error:

Continue reading

We recently saw this error on a Drupal 6 site that had not been updated for quite a while."warning: call_user_func_array() expects parameter 2 to be array, string given in sites/all/modules/contrib/views/views.module" means what it says. call_user_func_array expects the second parameter to be an array whereas a string was given instead. You can troubleshoot problems like this by writing a bit of debug code before the line where the error is reported.

Continue reading

As the world of internet grows day to day, the more educated and ever-wanting userbase now needs more data asynchronously. They don’t like to wait or load another page to see their data. In such situations we developers need to use more and more AJAX (Asynchronous JavaScript and XML - http://en.wikipedia.org/wiki/Ajax_(programming)) in the development of websites. Using AJAX in your web-development workflow is not that much difficult as you think. There is already a wide range of famous ajax libraries that make handling asynchronous requests easy for us.

Continue reading
0

As a Drupal developer, when we get an error, we may want to know the functions that are called before the system called the function where we get the error. In this case, views_trace() function comes to your help. This function is available if Drupal’s Views module is installed and enabled.

Continue reading
0

The simplest debugging tool used most often by a programmer is a print statement, which when placed, used wisely can bring out the weak points of any giant bug.

Continue reading
0

While developing Drupal sites, sometimes we may wish to see whether our function is getting called or whether we reach a point or not in the execution path. Usually the dpm() or print_r() functions comes handy in the case, but sometimes, we may not be able to see the debug messages printed due to page redirection just after our print.

Continue reading

We get frequent requests to rebuild existing sites using Drupal. When we get such a request it would help to have a copy of the full site on our local server to make it easier for themers and developers to reuse whatever existing components that can be salvaged from the original site. Wget is a powerful tool that can help mirror websites locally or on any web servers.

Continue reading
  • By webmaster on April 27, 2012 - 13:01
  • Debugging
0

A web developer’s life becomes much saner if he/she has easy access to all page header information. Firefox offers you PLUGIN-NAME that helps you inspect headers.

Here is something for the terminally inclined ones among you - wget. To view the http headers give the following command in gnome terminal :

wget -S --spider www.example.com

Continue reading