Home / Taxonomy term

S-Files

The S-Files: Getting the most out of Comment Notify

Tech Support Case Studies

If Facebook has shown us anything, it's that website users like to get timely notifications via email if there is something new to be seen on the site. Acquia Drupal includes the comment notify module that can help achieve this goal for your site. It sends email messages to content authors and commentators whenever new comments are added to content. There are ample subscription options to suit everyone, and an unsubscribe mechanism so that nobody has to endure unwanted items in their inbox.

The S-Files: When node_load won't load, and the anonymous user has vanished

Tech Support Case Studies Use these two SQL commands to repair your Drupal 6 site to restore the anonymous user database record:
INSERT INTO users (name, mail) VALUES ('', '');
UPDATE users SET uid=0 WHERE name='';
The symptoms you'll see that tip you off that this is needed:
  1. node_load() is not loading nodes that you can prove are in the node table.
  2. node_delete() is not deleting nodes that you can prove are in the node table.
  3. The query SELECT * FROM users WHERE uid=0; returns zero rows.

The S-Files: Adding a custom sort to Acquia Search (Apache Solr)

Tech Support Case Studies

We've received several inquiries about adding custom sorts to the the sorting block on search results for our popular Acquia Search product. This is fortunately quite easy, though it currently involves preparing a custom module that implements one hook:
hook_apachesolr_prepare_query(&$query)

<?php
  
function hook_apachesolr_prepare_query(&$query) {
    
// You can get the 'solr_field_name' from q=admin/reports/apachesolr
    
$query->set_available_sort('solr_field_name', array(
      
// how the sort link is to appear in the sorts block
      
'title' => t('Name of sort'),
      
'default' => 'asc', // or 'desc'
     
));
   }
?>

The S-Files: Acquia Drupal Stack installer Got packet bigger than max_allowed_packet bytes

Tech Support Case Studies

The S-Files are a taste of the support that you get with a subscription to Acquia Support. Our support team helps you solve technical problems relating to your Drupal sites.

The Acquia Drupal Stack installer is a major productivity booster for getting up and running in the development of your Drupal site. Sometimes, though, Drupal modules like to cache huge data packets in the database. This results in an error in your browser that says this:

Got packet bigger than ‘max_allowed_packet’ bytes

This is an indication that the data being sent between Drupal and the database is large, and exceeds the default setting.

Fortunately the fix for this is easy. In the application installation directory of the stack installer you'll find the following directory and file:

Applications/acquia-drupal on my Mac

Edit the my.ini file with whatever text editor you like, and add these lines to the end:

#Max packets
max_allowed_packet = 128M

Now stop and start the Acquia Drupal Stack using the Acquia Drupal Control Panel, and the new setting will come into effect. This should solve your max_allowed_packet problem!

The S-Files: Cron run exceeded the time limit and was aborted.

Tech Support Case Studies

Our support team is prepared to deal with any Drupal related problem or question that might arise. Some problems show up more often than others, though, and in those cases it is good to have the solutions at your fingertips.

This recently got added to our growing library of Drupal knowledge, and deals with the problem of running cron efficiently. In the effort to tune PHP to perform well while serving normal web pages, it is possible to set some values in php.ini so low that they are insufficient for running cron.

The S-Files: "A view that displays a user's content"

UPDATE: I think this recipe is deprecated by the Views Attach module which addresses the use case directly: http://drupal.org/project/views_attach

Tech Support Case Studies

S-Files: Customizing a theme with a sub-theme

This is the first in a two-part post about creating a sub-theme and using the sub-theme to customize the display of a views block on an Acquia Drupal site. The first installment will include creating the sub-theme and adding some CSS. In part two we'll get into updating the theming for a views block.

S-Files: Adding Basic Search Fields and Filters to Views

Tech Support Case Studies

Being that Views is both a very popular module and included in Acquia Drupal, we get a lot of questions regarding how to configure and customize views in various ways. One thing that has come up a few times is a customer wanting to add custom searching or filters to their views.

The S-Files: "Why can't a user edit content?"

A few days ago a user emailed with a problem about giving users the ability to edit content. The problem started with a small site that had been added to over time. Now that there were a few more pages to maintain the webmaster wanted to give access to other users to manage a few pages.

The S-Files: "Help I deleted my theme"

Tech Support Case Studies
One of the core services that Acquia offers is support for people building sites with Drupal. "The S-Files" are stories about the day-to-day life of our support team. Each one contains a nugget of Drupal knowledge that helped a customer succeed with Drupal. Enjoy!

"Hello, I installed a new theme on my site but I didn't like it. So I deleted it. Now I can't log into my site and it really looks broken."