Blog Archives

Adding a “Filter by year” Facet for a Date Field in Apachesolr for Drupal 7

A Drupal 7 site I’m working on makes use of the Apache Solr Search module and FacetAPI. Some of the content has a date field named field_s_date. I was tasked with providing a sidebar “Filter by year” facet block to filter

Tagged with: , , ,
Posted in Development

Rendering an Image in Apache SOLR Search results (Drupal 7)

Introduction There are a few ways to get extra information into the output of your Apache Solr Search results. The most efficient ways involve getting the information into the solr index and pulling it directly from the solr index. We

Tagged with: , ,
Posted in Development

Importing Paragraph Content with Feeds in Drupal 7

As I write this, there isn’t an established way to import data into Paragraphs using Feeds. This solution only caters to my particular fields, but it should serve as an example of one way to import HTML content into a basic

Tagged with: , , ,
Posted in Development

Auto-create URL Redirects in Feeds

I’m working on a website redesign. The original site used awful URL aliases where nearly everything got a URL like /content/title-of-page-would-end-up-looking-like-this. There are no “sections” to speak of in the URL structure, and there are several thousand nodes! I’m migrating most

Tagged with: , , ,
Posted in Development

Adding Metatag Keywords to Search API Index

For a great explanation of the implementation below, please visit http://enzolutions.com/articles/2015/06/02/how-to-add-customs-fields-to-solr-index-using-entity-api-amp-search-api/ The following demonstrates how to add metatag keywords (from the Metatag module) to your Search API fields list, so that you can index them and make them searchable.

Tagged with: , , , ,
Posted in Development

Automatic Screenshots of Drupal Content

In an earlier post I recommended webkit2png for automatically screenshotting a list of URLs. A lot of time has passed since that post, and I’ve discovered a more robust tool. Pageres is incredible, and it has a CLI and an api. I’ll

Tagged with: ,
Posted in Development, Tech Tips

Disable Drupal’s default “user X has applied for an account” email

By default Drupal sends an email to the site admin; it’s not editable (and you cannot disable it) from the account settings page. On a recent project I had to use Rules to send some emails when a user registers for

Tagged with: , ,
Posted in Development

Allowing Users to Cancel Their Own Commerce Licenses

UPDATE: I’ve written a contrib module called Commerce License Cancel to get the ball rolling to make this a community effort. Read on if you’d like to see how I got there. There’s been some talk in the issue queue

Tagged with: , , , , ,
Posted in Development

When Did Drupal Cron Last Run?

Here’s a simple drush command to determine when Drupal cron (and node index cron) last ran:

 

Tagged with: , ,
Posted in Development