* Implements template_preprocess_taxonomy_term().
* Implements hook_theme_suggestions_alter().
Not sure what happened with GlusterFS tonight. Around 19:07 EST, the AWS alarm sounded. After rebooting the GlusterFS servers and the web servers, nothing was bringing the sites back online. There was a terrible lag when accessing the GlusterFS file systems and there weren't any glaring errors in the log files.
* Implements template_preprocess_node().
Adding placeholder text to a Drupal 8 form element that is the label of the form can be done in your .theme file with the hook template_preprocess_input().
Today I had the task of gathering files from a Drupal website into an archive to send to a client. The files were stored in the database and were spread out across the public files and the private files directories. In order to create an archive and prevent the client from manually clicking on 1000 file download links, I did the following.
I came across a need to keep a menu link active, but, I didn't want it to be displayed to the anonymous user. After much searching I found the hook_menu_link_alter() function and the hook_translated_menu_link_alter() function.
With these functions, I was able to alter the menu item that I wanted to not display with hook_menu_link_alter():
Today I had the need to dump a certain amount of rows from an existing database and insert them into a new table with the same structure. This application required me to not include the table structure nor the primary key (id). To get the database dump, I used the following command.
I was working on setting up a role migration from Drupal 6 to Drupal 7. After some time, I noticed that the role id's were not being preserved, which was going to cause a problem for me when I went to take the migration to the live server. I initially tried using the addFieldMapping function to link the source rid to the destination rid (similar to preserving the nid for nodes or the uid for users). However, this failed to save any of the roles during migration.