Blogs

Top Tip: Drupal Views - No valid values found on filter

Expose your Master display!

Views ErrorNow and again a little issue occurs that makes you pull your hair out.

I like to have NO errors on my sites and today whilst refactoring a view kept getting this error: No valid values found on filter: Content. But all my filters seem OK and the views work fine....

Doing it the Drupal way...

It is quite common practice to add head elements such as:

  • metatags and links such as webfont links and
  • xmlns namespaces

as text to the html.tpl.php or in template.php in hook_preprocess_html etc and other string based ways of doing things.
The problem with this is that it is hard coded and not the Drupal way. I have cobbled together some examples of how we do this in code (most of which have been gleaned from issue queues, posts and other great Drupal.org sources - credit to many anon contributors! The point here is simply to pull together some examples.

Drupal_add_js - Tip: Checking for javascript already added to page

We are working on a series of Facebook modules for Drupal at the moment. These enable us to use Drupal to serve facebook applications and integrate the site(s) we are developing tightly with Facebook. We are developing them as a set of submodules (more on that later...)
One of the issues we have faced is that javascript needed for opengraph integration may be added by more than one module (custom and contrib).
Using drupal_add_js() in several modules.
Like:

<?php

Drupal Commerce Order display - Missing Template filename and path - .tpl.php

Wrestling with an error message on a Drupal Commerce site today. I kept getting errors relating to a missing template file with no path and no file name .tpl.php. Fortunatley with a little debugging giving me a pointer to the correct issue queue on Drupal the solution was readily available. So here's a few easy steps to follow in case you have the same issue.

Importing Products Displays and related Products to Drupal Commerce

In this post I am going to look at Drupal Commerce and demonstrate how to prepare e-commerce product data for import into Drupal Commerce - and show how to create a delimited list of product references to link the products to their display nodes. These techniques supplement the wealth of great practical demos and documentation provided by the Commerce team.

Top Car Dealership adopts Drupal

Kambara has just launched a new website design for Burton Kia at www.burtonkia.co.uk.

History of Parliament Online - Uses Drupal

We were engaged by the History of Parliament Trust to work on their flagship website that publishes the results of research into the members and constituencies of all British parliaments since 1386.

See for yourself at : http://www.historyofparliamentonline.org

This data rich web site is managed by the Drupal CMS and has tens of thousands of 'nodes'.

A case for the Drupal commerce detective

Finally solved a curious issue that has been nagging me on a test Drupal commerce site.
I have a utility script that lists products that are not linked to Product Displays (handy). Perplexingly the ‘report’ kept showing some orphaned products even though I had linked them all and the report had shown none previously.
It is a test site undergoing some heavy development so at first I put it down to that - rolling the database back and forth etc But today I noticed it and was pretty sure that nothing had changed that could cause such data changes. Could it be some bug in entity API, commerce ? Unlikely! So crack out the deer stalker and pipe lets investigate!

Drupal 7 commerce multi currency site using a price list

Below are my notes taken as I investigate techniques to achieve my Objective,
(This post is not a normalised set of instructions but the process I went through to figure out the best way to handle multiple currencies c objective)
if I get a chance ill create another post with a normalised set of instructions/explanation.


Objective

A custom/optional Drupal teaser in a view using the Views Custom Field module

A client needed implementing a custom teaser/short description for a CCK field (not the body) in his Drupal 6 site. The requirements: if the short description/ teaser is available use it otherwise get the data from the CCK field. It is important to note that Display Suite Drupal module was not available as I think it provides a much better approach (will post about in the future).

I have used the Views Custom Field module , this adds a PHP field that allows us to add PHP code to a view.