Tuesday, November 26, 2019

Drupal 7 - How To Quickly Add Title Search To The Content Administration Interface

CentOS 7 / Drupal 7 / Ubercart 7 


How To Quickly Add Title Search To The Content Administration Interface

tl;dr:  Skip to the section entitled How To Install The Find Content Module

One of the most frustrating things about Drupal is the incredibly slow pace at which even some of the most basic user requirements are addressed and then integrated into the base Drupal product by the Drupal Core Team.  I just don't understand why the Drupal Core Team chooses to ignore the problems and pleas of myriads of Drupal users...but they do - leaving thousands in the lurch and wasting millions of precious person-seconds as a consequence.  

I guess the only opinion that counts with them is that of other programmers, which I think is a real blindness of the Drupal community.  Drupal programmers should talk to (or even become) Drupal users.  I believe Drupal would immediately become a much superior product if that were that to ever happen.  I think Developer narcissism is one of the single biggest impediments to more widespread Drupal adoption.

One of the most basic functionalities of any Content Management System (CMS) like Drupal is the ability to find stuff.  
The inability of Drupal to enable site Administrator (or Content Editors, or whoever) the ability to to find stuff easily through a Search Content by Node Title function is a real weakness of Drupal out of the box.  It needlessly makes Drupal tougher from a usability point of view, especially when you have hundreds or even thousands of pieces of individual content generated over the years.

Instead, you get an interface like this, which might work for a programming/testing environment, but not really all that great for a production environment:



As you can see,  there's no function in there that allows someon to search by TITLE, yet that's how regular people think.  

Instead, the default display is of content in order of reverse time, which is convenient a lot of the time to find the stuff that you just worked on - but that is not always what you are looking for.  Once you start to need to find something that's a little less recent, finding it gets a lot harder.  Of course, you can click on the heading, which then orders the nodes by TITLE, but the interface also constrains the list to 50 or so items per page, which becomes quite a pain when you have hundreds of pieces of individual content and then have to hunt and peck for the page holds the content you are looking for.



Personally, I find it all so unnecessary.  

It's not like this problem is new.  There used to be a great module for Drupal 6 called the Content Management Filter Module that enabled a large number of different content searches and operations (including search by Title):



Here's what the Content Management Filter Module interface looked like.  


The  Content Management Filter Module was super useful, and it enabled very powerful content searches.  Unbelievably, this functionality was never integrated into the base Drupal 7 product.  Instead, the Drupal Core Team deprecated the  Content Management Filter Module, so it never got upgraded to become compatible with Drupal 7 because it wasn't "approved of".



Here's some documentation of a Drupal mucky-muck voicing his opinion about this matter and stifling innovation as a consequence:



...and promoting Administration Views  This is the solution that was supported by that person 6 years ago, and yet it is still to this day not included in the base Drupal 7 product, leaving users doubly out in the cold!  Instead, it was folded into "a future release", i.e. Drupal 8.  This is a real problem with the Drupal Core Team, they always seem to be kicking that useability can down the road, towards some mythical "fix-all, be-all" release that never arrives.

What a Galactic FAIL

So, unbelievably...six years later....Drupal 7 still doesn't have Content Search by Title.  

Anyways, here's the recommended method, by way of the Administration Views Module.  OK, let's try it on for size...



Hold on a sec.  The Administration Views Module requires the Views Bulk Operations (VBO) Module...



Wait, wait!  The Views Bulk Operations (VBO) Module requires the Entity API Module...



So you have to install three modules, in reverse order, simply to gain the ability to perform a  Drupal Content Search by Title - functionality that should by all rights have come with Drupal out of the box. Good grief! 

Forget it.  Just install the Find Content Module!


How To Install The Find Content Module


The Find Content Module has no dependencies.  Instead, it is a one-shot, simple and lightweight way to add Content Search by Title to your Drupal 7 installation:


Here's some Project Information, as well as the latest version at the time of this writing:



Installation is easy, you can either use the GUI to install, or the CLI.

GUI Installation:

To install using the GUI, just copy/paste the location of the Find Content Module .tgz file on drupal.org into the Install from a URL text box in the Install Modules interface of the Drupal Administrator GUI, and then click on Install:



You should see this screen next, which indicates that the installation was a success:



CLI Installation:

Installing from the Linux CLI is pretty straightforward.  

Just navigate to the modules directory, use wget and then paste the location of the .tgz file into the command line.  After that, unpack the module.  

Here's how I did it:

# pwd
<drupal_root>/sites/all/modules

NOTE:   In the above example, replace <drupal_root> with your drupal installation directory.

# wget https://ftp.drupal.org/files/projects/find_content-7.x-1.7.tar.gz
--2019-11-26 11:09:58--  https://ftp.drupal.org/files/projects/find_content-7.x-1.7.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.2.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8333 (8.1K) [application/octet-stream]
Saving to: ‘find_content-7.x-1.7.tar.gz’

100%[=================================================================================================================>] 8,333       --.-K/s   in 0s

2019-11-26 11:09:58 (20.5 MB/s) - ‘find_content-7.x-1.7.tar.gz’ saved [8333/8333]

# tar -zxvf find_content-7.x-1.7.tar.gz
find_content/
find_content/find_content.module
find_content/README.txt
find_content/find_content.info

find_content/LICENSE.txt

NOTE:  if you use the CLI installation method, you will need to enable the module in the Drupal Administrator GUI:

Turn the Find Content Module ON and then click on Save Configuration:



Using Find Content


Now that the Find Content Module is installed and activated, navigate over to the Content area of the Drupal Administratror GUI and give it a try:

Here's what I did:  I used the SEARCH BY TITLE area to look for all content with the word Cough in the title, and here's what I got as a result:




Great Success!


REFERENCES


https://www.drupal.org/project/find_content


No comments:

Post a Comment