RespImgPageCache not found in file for Drupal

Written by | 2 minutes read | Tags php, drupal | Comments

I’m working with Drupal and installing a new module is probably no problem. After installing the webform module I got the following error on the QA system:

Fatal error: Class 'RespImgPageCache' not found in /var/www/releases/drupal/releases/20140603132022/includes/ on line 31

I removed the module, and clear the cache with drush cache-clear - in the end I still got the error.

After searching for this error I found the solution on a Drupal thread. I inserted the following snippet in the file:

$cache_class_cache_page_old = variable_get('resp_img_cache_class_cache_page_old');
  if (isset($cache_class_cache_page_old)) {
    variable_set('cache_class_cache_page', $cache_class_cache_page_old);
  else {

After this commit, you have to call some Drupal page where the loading will take a while. After the loading is finished you still get white pages now you have to remove the code snippet from above in another commit. Now the RespImgPageCache error was gone.

The strange thing was, that the webform module didn’t had any dependencies to the RespImgPageCache module. Hopefully, this post will help other developers save a lot of time.