Articles about Drupal
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.
i18n / Internationalization module
We use the i18n menu module that comes with the Internationalization module.
While the module provides configuration options for language specific menu items, simply enabling the module creates a new translation text group called "Menu" that exposes all menu items to the translation interface.
You can use the translate interface to translate all the menu items except for once created by nodes for those you should translate the node and specify the translated menu title.
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.
Basic Content authoring in Drupal
Each node in Drupal has an option to be 'Published' or 'Unpublished Published' under “Publishing Options” in the node edit screen. This enables content authors to be able to create content before publishing it on the live site. The field out of the "core" box can have the values of published and unpublished (this can be extended but that's a topic for another post).
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
As part of the Brighton Digital Festival and the Brighton Area Drupal weekend Blue-Bag and three other Drupal houses in New England Gouse Brighton UK will be opening their doors this coming Friday.
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'.
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!