Drupal

29 Jul 2011

Ubuntu 11 - Creating a LAMP sandbox to play with

Deploy an Ubuntu LAMP server on your old PC, plug it to your home network and start web developing. The following guidelines were tested on a Pentium III x86 CPU processor, Ubuntu 11 Desktop edition and Windows 7 as the complementary primary PC. This is not a detailed tutorial, it is a notepad of necessary software and Ubuntu 11 specific solutions.

31 Aug 2010

node links order and module weight

I had my modules updated and voila! a new problem waiting to be solved.

The node-links section is being shared by the "print" (now "Printer, e-mail and PDF versions" module) and "service_links" modules. After the update process, the service links had been placed between "print" and "email" (parts of the print module). I don't like this.

So… how can someone manipulate the order of the objects in the links section? If you simply want the objects of one module to be in front (or after) the other module's objects, the answer is "module weight".

23 Jul 2010

Advertisement module error

If you updated the ad module (Drupal) to the latest dev version, you may come across the above error message:

user warning: Unknown column 'sitekey' in 'where clause' query: UPDATE ad_statistics SET count = count + 1 WHERE date = 2010060800 AND aid = 6149 AND action = 'create' AND adgroup = '' AND hostid = '' AND sitekey = '' in .../sites/all/modules/ad/ad.module on line 333.

or something similar to it.

06 Jul 2010

UTF-8, Greek and a Facebook sharer bug?

comments bellow header

Fmag.gr is a photography-news oriented website. Every post has links at the bottom, "print this", "email this" and share on facebook, digg etc.

About a month ago, I saw a strange behavior. If someone was clicking on the "Share on Facebook" link, Facebook was parsing the article with wrong encoding. I couldn’t explain that because it suddenly happened without any change in the drupal code by my side. I was convinced that Facebook is the problem and it will be fixed soon. That did not happen.

26 Apr 2010

drupal views rewrite output to invalid markup

While I was testing the fmag.gr with the w3c validators, I saw several errors about

<h2> and <h5>

elements that where inside <a hrefs. I immediately spotted the problem on the node titles.

More specific: page views at fmag.gr are using fields. The field "node title" has a rewritten output to

<h5>[title]</h5>

and the "link to full node" checked.

Further investigation revealed that views module "links to full node" the whole "rewritten output" and not just the variable [title]. Therefore, the html output was

<h5><a href="...">[title]</a></h5>