Articles written by: George Boobyer
Sometimes you come across a problem in SQL that is far more complex than you first imagine. One classic of these is 'Relational Division' - a poorly understood aspect of SQL that can help answer what must be a common question:
Return the things that have all of the items in a given list
I came across a weird situation today - that I am surprised I have not encountered (or remember encountering) before. Images that show up fine in all browsers apart from IE8 - which displays the broken image with a red cross. Came across this by chance when we were doing some cross browser testing - and of course it was a rare inconsistent issue that affects IE...
Last month I wrote a post about blocking spammers from a Drupal (or any Linux / Apache) site by identifying the originating IP address from the watchdog table.
By way of an update I thought I'd share a way you can do this using the Apache configuration. Ideally this would be done in the vHosts/Httpd files if you manage your own server but works equally well within the .htaccess files that most people have access to on shared hosting.
Always nice to start the new year with a challenge.
I created some new products for a client's Drupal Commerce site and translated them into 10 languages. All good until it was noted that the view that displays the products was showing the new products in Dutch not the default English - although all other products were showing up in the correct language.
One of the housekeeping tasks that I undertake is to review the activity of comment spammers on our websites.
All of our Drupal sites use Mollom to keep us almost Spam free (big thumbs up to Mollom!)
But if you review the logs you can see that Mollom is protecting you from an alarming rate of attack and it would be good to not bother ourselves or Mollom with such traffic is possible. So the solution is to drop the traffic upstream of our web sites.
There are many ways of doing this from Firewalls to Drupal modules.
If you have been enjoying the Drupal Commerce Kickstart demo of what Drupal Commerce can do you are likely to be greatly inspired to use the techniques showcased in this amazing product. However you may not yet have noticed that you are getting 404 errors on the product page. In this post I cover how to solve this issue.
When you create a multilingual site with Drupal there are lot of things to consider; should I use content translation, entity translation, what about views, what about node titles.
There are lot of great resources out there and with a
little lot of effort you can get it all working.
However one thing that is easily overlooked is all the strings you use in your jQuery files.
After wrestling with this for a while this evening it struck me that it isn't a very well documented area - so I thought I'd make a quick post as much for my own notes as hopefully assistance for someone else.
The issue: You have some jQuery that runs once the page has loaded and you find that it runs on Ajax post backs .. Ugh!!
The end result is that you get the behaviour repeated every time the code runs - not nice.
The answer lies in the use of the jQuery .Once() - see http://drupal.org/update/modules/6/7#jquery_once
If you are developing commerce sites and review your logs regularly, chances are you will come across 404 errors looking for crossdomain.xml. We get a lot from the plugins that looks for coupons on e-commerce sites (e.g. Drop Down Deals). In fact you are likely to get them on any sites you develop - but we have seen them more frequently on ecommerce sites.
Expose your Master display!
Now 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....
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.
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...)
Using drupal_add_js() in several modules.
We were engaged to create a socially linked ecommerce site for a new brand range of Dickies clothing - Dickies Streetwear. The brief called for a high performance state of the art site that engaged a growing customer base in the streetwear market. So rather than create a run of the mill ecommerce catalogue site we wanted to create a rich user experience based around news and social media with purchasing opportunities presented across the site.
Drupal (pronounced drew-pull) is a Content Management System and web application development software written in a popular scripting language - PHP. Drupal has over 11,000 modules and over 1,000 themes, along with both a point and click interface to allow tech-savvy people to put together websites with no programming experience; and an API and framework for programmers to develop unique applications. Best of all, it's free, open source software!
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.
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.
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'.