Planet Drupal

Subscribe to Planet Drupal feed - aggregated feeds in category Planet Drupal
Updated: 11 min 4 sec ago

Propeople Blog: How to test Standard Search in Drupal

Tue, 31/12/2013 - 15:38

It’s not a secret that QA engineers work with technical specifications, but sometimes there are no specs regarding the search functionality on a site and you end up with something like “Default search module”, or your PM will just say - “Simple search, nothing to test”. In this situation you can use only your imagination. This blog post is for those quality assurance engineers who might not know what “Standard Search in Drupal 7” really means, or how to test it.

First thing you should know about the Standard Search in Drupal 7 is the way it indexes content. The content can either be reindexed manually, or be automatically marked for reindex after you add it (or edit existing content). The content that’s queued for reindexing will be indexed when cron runs. This can happen automatically through the use of a specific schedule, or, for testing purposes, you can run it manually from the Admin UI.

To run cron, you have 2 options:

  1. Use the Administration Menu module - hover over the home icon in the toolbar and click Run cron.
  2. Go to Reports > Status report (admin/reports/status), and under Cron maintenance tasks click run cron manually.

Note: If you use Apache Solr for your Search system, it may be not enough to just run cron once. It usually needs an additional 2 minutes after “run cron” to re-index results.

The best way to start testing is getting to know the search configurations done on the site. If you go to configuration-> search and metadata ->search settings, you’ll find the configurations implemented for your search. Now, lets see them more closely.

1. Drupal Search allows users with Use search permission to search for content and users separately. By default, both Node and User searches are active. In order to search for users, the user should have permission to view user profiles.

2. By default Minimum word length to index is set to 3, that means that you will not be able to do a search if you don’t have at least one 3-character word in your search query.

This also means that if you search for nodes with title ”How to find a bug” you can find it by using the keywords: “find”, “bug” and “how”.

You should get results in the following cases:

  • Whole title (ex: how to find a bug)
  • Long words (ex: find)
  • Long word and short word (ex: to find )

You should get a validation error for:

  • Only short words (ex: to a)

You should get “No results” for:

  • one long word and one word not from this sentence (ex: bug report)

Also search is indexing (saving) keywords separated by spaces. The following examples will not return any results:

  • half or part of the word (ex: fin)
  • words without spaces between them (ex: howtofind)
  • words separated by underscores or something else (ex: how_to_find_a_bug)

Results should appear for these cases:

  • With multiple spaces between words (ex: how to find a bug)
  • Or in reverse order (ex: bug a find to how)

4. Lower/upper cases - Test your search by entering words with upper and lower cases (ex: InTerVIEw). This should work out of the box in case-insensitive mode.

5. Don’t forget that this search should work not only with titles, but with all content bodies as well. Make sure to search for some keywords from the content, maybe you’ll find a little bug. You never know.

6. Permissions - To know what permission the users have, go to Modules-> Search-> Permissions (or People and select the Permissions tab).

By default, all users (Anonymous + authenticated) can view published nodes, so they should appear in the returned results (if you allow anonymous users to search, of course). In this case just unpublish the node and then enter its title in the search field. You know what result you should get.

I hope this information will make your testing easier and more pleasant! Happy New Year!

Language English Tags: DrupalDevelopmentCheck this option to include this post in Planet Drupal aggregator: planet
Categories: Elsewhere

Edison Wong: Announcing TWBS LESS: Simple LESS Support for Drupal 7

Tue, 31/12/2013 - 08:35

During TWBS development I figure out that introducing LESS support in Drupal 7 would be a great idea when combine with Bootstrap and Font Awesome. After some research and development during Christmas holiday, I would like to introduce my helper module named "TWBS LESS". The goal of TWBS LESS is to provide a handy support for LESS and act as the helper module for on going Drupal-Bootstrap-Remix development.

Add your files just like any other CSS file, just with .less as the extension, and they will be automatically processed. No additional configuration is required.

Key Features
  • Provide drush make file for library download
  • Confirm library successfully initialized with hook_requirements()
  • Support both LTR *.less and RTL *-rtl.less, as like as that of locale_css_alter() supported
  • If Drupal's CSS aggregation enabled, all .less will automatically compile at server-side by lessphp as .css before Drupal CSS aggregation
  • If Drupal's CSS aggregation disabled, all .less will link with rel set to "stylesheel/less" individually, so less.js will handle with client-side compile
  • Support FireLESS for .less debug with Firebug in client-side compile mode
Live Demo

TWBS LESS is now integrated into DruStack distribution, so you can try it in a live sandbox with

Why Another LESS Module?

For general and generic LESS support you should consider another LESS CSS Preprocessor module which started since 2010-03-04.

On the other hand you should consider about using this module because of:

  • Purely design for assist TWBS, which means you will have the best compatibility when using both together
  • Support both server-side pre-compile / client-side live-compile with debug mode enable; LESS CSS Preprocessor only support server-side pre-compile
  • RTL support with *-rtl.less just as simple as CSS *-rtl.css that Drupal core supported; LESS CSS Preprocessor require it to be named as "somename.css.less" style
  • Server-side pre-compile CSS as naming based on its original .less md5_file() result, which means even you add a single space the cache file will also be regenerate; LESS CSS Preprocessor calculate based on filemtime()
  • Much simple implementation which handle all LESS support automatically as like as that of Drupal core CSS support; LESS CSS Preprocessor coming with 3.5x times as compare in final downloadable archive size

Please feel free to test it out and comment with your idea. Let's enjoy simplified theme development with LESS ;-)

Tags Drupal Development
Categories: Elsewhere

Drupal core announcements: Drupal 7 core release on Wednesday, January 1 (or Thursday, January 2)

Tue, 31/12/2013 - 04:51
Start:  2014-01-01 (All day) - 2014-01-02 (All day) America/New_York Sprint Organizers:  David_Rothstein

The monthly Drupal core bug fix release window is this Wednesday, and since it has been a while since the last one, I plan to release Drupal 7.25 on that date. However, in practice the release might not happen until Thursday, due to the holiday and to give people a bit more time to test the latest code. Per our release policy, this will be a bug fix release only (no security fixes).

The final patches for 7.25 have been committed and the code is frozen (excluding documentation fixes and fixes for any regressions that may be found in the next couple days). So, now is a wonderful time to update your development/staging servers to the latest 7.x code and help us catch any regressions in advance.

The relevant change records for Drupal 7.25 are listed below. This is not the full list of changes, rather only a list of notable API additions and data structure changes that might affect a number of other modules, so it's a good place to start looking for any problems:

You might also be interested in the tentative CHANGELOG.txt for Drupal 7.25 and the corresponding list of important issues that will be highlighted in the Drupal 7.25 release notes.

If you do find any regressions, please report them in the issue queue. Thanks!

Upcoming release windows after this week include:

  • Wednesday, January 15 (security release window)
  • Wednesday, February 5 (bug fix release window)

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Categories: Elsewhere

Configuration Management Initiative: Upcoming CMI Meetings

Tue, 31/12/2013 - 02:33

Contrary to popular belief, the Drupal 8 Configuration Management Initiative (CMI) is not done. In fact, there is still a fair amount of work remaining. To help get some momentum, we are going to start holding CMI IRC meetings in #drupal-cmi every other Monday at 20:00 UTC (3pm Eastern). Our next IRC meeting will be Monday, January 13 at 20:00 UTC. Additional meetings will be on January 27, February 10, 24, etc. All of the Drupal 8 initiative meetings, including the CMI meetings, are listed on the calendar on Drupal 8 Updates and How to Help.

Anyone who is interested in helping to get Drupal 8 closer to having a working configuration system is welcome to join the IRC meetings. That said, we have a lot of complex problems to solve. While it would certainly be helpful to check out the the issues listed under the tabs above (Focus Issues, Beta Blocker, Novice Issues, etc.) our most important issues at the moment are listed on the meta issue Making configuration synchronisation work.

Categories: Elsewhere

Acquia: 2013 Greatest Hits – Gaelan Steele meets Dries

Mon, 30/12/2013 - 22:55

One of my favorite Drupal moments in 2013 was meeting Gaelan Steele in person at DrupalCon Portland. This was eclipsed very quickly by being present when Gaelan and Dries met for the first time - and having my podcast microphone on! This was probably also eclipsed by Gaelan schooling Dries on how he learned to use Drupal ... see his answer below and in the podcast.

Categories: Elsewhere

Friendly Machine: Omega vs. Zen - Which Base Theme Should You Choose?

Mon, 30/12/2013 - 18:23

If you’ve been reading my posts for a while, you’ll know that I’m a fan of the Omega base theme and have used it in many of my projects. As I’ve gotten more familiar with it, I’ve noticed it bears a striking resemblance to the latest release of Zen.

For those of you not familiar with Drupal base themes, Zen has long been the most popular. I thought I’d take a look at the two of these themes and see how they really match up and which one might be the better choice for a given project.

Big Changes to Omega

First things first - Omega 4 bears only a passing resemblance to Omega 3. It’s essentially a complete re-write (see my overview) and the changes may be jarring for those who’ve become familiar with Omega 3’s UI layout tools.

Those tools are long gone. As I noted above, what you have with Omega 4 is something strikingly similar to Zen in almost every way. Much of this has to do with both maintainers adhering to emerging best practices in front end development, but it's also due to choice of tools.

Feature Comparison

Below is a table that shows some of the features of both Zen and Omega.

Feature Omega Zen  HTML5 Yes Yes  Sass + Compass Yes Yes  Swappable layouts Yes Yes  Default grids Susy Zen Grids  Drush support Yes Yes  IE conditional classes Yes Yes  Mobile first Yes Yes  HTML5 shiv, Respond.js Yes Yes

Quite a bit of overlap wouldn’t you say? Having worked with both themes, I can tell you it’s pretty easy jumping back and forth between them. Conceptually, they are essentially the same, with only minor differences in implementation.

One thing that sticks out to me is that both are very flexible. You can create an Omega sub-theme using Zen Grids, for example. Likewise you can create a Zen sub-theme using Omega’s default grid system, Susy.

The SMACSS approach to modular CSS makes it a snap to move some of your boilerplate styles between themes. They’re both put together in a really smart way and offer big improvements over previous approaches to theme development.

And of course, both use Sass + Compass, which seems to be preferred over LESS among Drupal developers.

One Difference Between Zen and Omega

We see that the two of these base themes have a lot in common, but in what ways are they different? Well, one difference seems to stem from the choice of default grid system.

Omega 4 uses Susy, and from what I understand, it has frequent updates that may break backward compatibility. This means you’ll need to keep careful track of your Gem versions, particularly when working in a team, if you want your Sass to compile correctly. The maintainer of Omega has explained how to set things up in this comment.

I suppose it could be argued that what he’s describing is a best practice generally, but will most people go through all of that? My experience tells me no. It really seems like a potential trouble spot, but I’m not sure. Perhaps Omega 4 hasn’t been around long enough to hear of missing Gemfiles causing issues - maybe it won’t be a problem at all.

That said, the “ideal set up” is a point of difference. With Zen you can get started with less hassle. Does this mean Zen is better than Omega? I don’t think so. For some, this will fit right in with the way they are already working.

The Big Difference

The biggest difference between the two base themes is Omega’s inclusion of layouts. These are predefined, Panels-style layouts that can be used with the Context Omega module to apply layouts to specific pages, content types or whatever other condition you may require.

These layouts can also be used with Panels Everywhere. In fact, the Omega layouts will appear in Panels when you have both Omega and Panels installed. Keep in mind, however, you can’t use these with vanilla Panels - only with Panels Everywhere. This is because Omega 4 layouts are variations on page.tpl.php and therefore control the entire layout of the page rather than just the node.

Sebastian Siemsen, the co-maintainer of Omega, did a long screencast on how to use Omega 4, including strategies for use with Panels for those that are interested.

So Which Is Better?

Of course the answer here is, “it depends”. If you like building sites with Panels Everywhere, then Omega 4 might have the edge. If you don’t like the development set up of Omega 4, then Zen might be a better choice. Another thing in Zen's favor is far superior documentation.

However, I think the truth is that it hardly matters which of these two you choose. Personally, I use both and I think that’s rather a good thing. It allows me to easily switch between them depending on the requirements of a given project.

If you have any comments on this post, you may politely leave them below.

Categories: Elsewhere Let's Drup Up The Week. Issue 13

Mon, 30/12/2013 - 13:44

This is the 13th issue of the weekly Drupal news round-up and the last one in the year 2013. The last week was pretty silent and it was hard to find something interesting, but in the end I've managed to dig some Drupal gold for you. Today will be no dessert, because of the sad events happening in my country of origin.

Wish you all a Happy New Year! Be healthy and happy, the rest is not so important. Let's Drup Up The Week!

Read on about Let's Drup Up The Week. Issue 13
Categories: Elsewhere

Wunderkraut blog: Weldir, a Wunderkraut Flavoured theme for Ægir

Mon, 30/12/2013 - 13:26

We have created an Eldir sub-theme that adds a Wunderkraut flavour and some other tweaks which make the Ægir UI more friendly and tasty.

Here at Wunderkraut Benelux, we love Ægir. We use to manage some aspects of our development, staging and production environments.

Since we often provide access, documentation, etc to our internal and external clients, we have created an Eldir sub-theme that adds a Wunderkraut flavour and some other tweaks which make the Ægir UI more friendly and tasty.


Weldir, as we've named the theme, builds on the Eldir theme and adds a few things we felt that were missing; buttoned pagers, a better footer position, some breathing room, and so on. Since we also document stuff in Ægir, we've added styling which can be used on links to create in-content buttons - call-to-actions if you will, to spruce up content and draw attention where needed. Simply add the button class to your link.

Weldir is available on GitHub. We hope it provides you with an alternative theme for this great tool.

Categories: Elsewhere

Janez Urevc: HHVM and Drupal (i.e. Drupal drinks some RedBull)

Mon, 30/12/2013 - 12:27

I've been following HHVM (HipHop Virtual machine) for some time now. Project got a bit more of my attention about a year ago, after session at FOSDEM 2013 by Sara Golemon. PHP has been criticized for quite a lot of it's characteristics, performance definitely being one of those. HHVM seemed to be very promising about fixing it and that's why it got my attention in the first place. Immediately after last year's FOSDEM I tried it with Drupal, but my attempt unfortunately failed miserably. HHVM was simply not yet ready for that.

But first a bit of history...

HipHop was initially developed by Facebook (and they are still it's main contributor). Facebook was looking for something that would make their PHP code base perform faster while still retaining benefits that PHP brings (primarily ease of use for developers). Initially they created a compiler (HPHPc) that transformed a PHP script into a C++ program, which was then compiled into a binary. This approach showed dramatic increase in performance, but also had some problems. HPHPc did not fully support PHP language and was not a simple drop-in replacement for "standard" (Zend) PHP.

Facebook decided to deprecate HPHPc, start working on a bit different approach and HHVM was born. HHVM is a Just-in-time compiler (JIT) for PHP. It behaves very similar to standard interpreter when observed from the outside (which means it can be a drop-in replacement for it), but it works quite different internally. It will run a program as an interpreter at the beginning of execution, collect some statistics for optimization and eventually compile it to byte code on the fly. Compiled program will then run much faster than it's interpreted version. It is quite obvious that we get true performance gains with applications that run for a longer period of time (because of initial interpretation phase and on-the-fly compilation). A standard web (Drupal) application, which is deployed to production servers from time to time, is exactly what we're looking for.

Categories: Elsewhere

Cheppers blog: Global Sprint Weekend January 25 and 26 2014

Sun, 29/12/2013 - 18:40

Global Sprint Weekend is a worldwide event you can participate in. Small local sprints in lots of locations, over the same time period: Saturday and Sunday January 25 and 26, 2014. These sprints will usually be 2-15 people in one location, together, working to make Drupal better.

You can make your own locations if no location is near you! Currently people have announced locations in Sevilla Spain; Berlin, Mannheim and Schwerin Germany; Ghent Belgium; Budapest Hungary (hosted at Cheppers and led by Gábor Hojtsy); Manchester UK; Vancouver, London (Ontario) and Montréal Canada; Oak Park, Chicago, Milwaukee, Boston, Minneapolis and Austin USA.

Categories: Elsewhere