- 2012-08-19: Working on the new Drupal 8 Entity system at Drupalcon Munich
- 2012-06-15: Working on the new Drupal 8 Entity system at DrupalDevDays Barcelona
- 2012-03-23: Working on the future Drupal Document Oriented Storage at DrupalCon Denver. D8 or later ? Bets are on.
- 2011-09-01: Building an Unfuddle to Drupal Casetracker import module using Migrate
- 2011-08-28: Back from DrupalCon London and its WSCCI code sprint. Wow.
- 2009-11-29: mongodb_watchdog module created by dereine, ported to D7 by me in about half an hour, and migrated in a larger MongoDB project by damz before the hour ended. Wow...
DRUPAL-5
What to do when you can no longer login to your Drupal site
Submitted by fgm on Thu, 2011-08-04 09:51So the scenario is this: you notice that you are no longer able to login on your Drupal site:
- the
{users}table entry for your account looks just fine - the
loginandaccesstimestamps on your account are just a few seconds old, matching your latest attempt to login - you reset your password in the DB, just in case, and it still does not work
- the telltale is that Drupal will not even tell you your login failed: it actually works, as the
{users}table shows, but yet you are not logged in
Can you guess what can have been going wrong and fix it ?
Debug vanilla
Submitted by fgm on Fri, 2009-12-11 13:14Most of the time, when working on some piece of code, I'll resort to the configured debugger in my current Zend Studio configuration. And you probably do too :-)
However, I often have to access debug-type information on live sites where installing a debugger is out of the question, and I find myself often resorting to parameter dumps like the following:
<?php
// lazy version for simple cases
function foo_bar($x, $y, $z) {
dsm(func_get_args());
// [...]
// less lazy version for more hairy cases
function foo_baz($x, $y, $z) {
dsm(array('in foo_baz, x' => $x, 'y' => $y, 'z' => $z));
// ...
?>You've probably being using it too and, of course, after the first few dozen times, it becomes a bit used. So here's a tiny snippet that makes such dumps simpler to type and use :
If non-admin users can see some user accounts but not others...
Submitted by fgm on Wed, 2009-03-11 14:48After a massive user import to a customer's site, said customer noticed that, while he could see any user profile when logged, he could only see some of them when he was not logged in, receiving an "access denied" on the other accounts.
Now, with the administer users permission, a user can see any profile, so this didn't come into consideration, but since anonymous users could see some profiles and not others, the permissions granting anonymous access to the profiles were obviously set up correctly. So what could be wrong ?
Reducing system load for graphical widgets
Submitted by fgm on Thu, 2008-08-21 22:02Using a graphics library, be GD, ImageMagick or anything else, is convenient, but carries a price to pay: unlike most Drupal parts, which are generally database-bound, image generation is typically CPU-bound: generating many images on the fly can significantly increase the CPU load on a system, while Drupal setups are typically not optimized for this, and could result in problems if you are using Drupal on a shared hosting account. So what ?
A graphical progress bar widget for FormsAPI
Submitted by fgm on Tue, 2008-08-19 19:44
In the
previous post, we saw how to create a XHTML progress bar widget for Forms API, using theme_progress_bar. The next logical step is now to create a graphical equivalent to that progress bar, as an example for far more advanced fully graphical widgets made possible using a similar mechanism.
A progress bar widget for FormsAPI
Submitted by fgm on Sun, 2008-08-17 15:18
As a Drupal user, you certainly noticed that update.php displays a nice progress bar to make you wait during its batch operations. And maybe you
also noticed theme_progress_bar in the API reference.
The question
Wouldn't it be nice to have that progress bar available as an extended version of markup that would graphically display a value in your forms without stuffing it in a markup element ?
Checkboxes in forms step by step
Submitted by fgm on Tue, 2008-08-12 22:09For some reason or another, I've noticed several new Drupal developers these last few days sweating on Forms API, and thought it would be nice to have a smallish example to complement the unavoidable FAPI reference and Guick start guide, for a typical non-basic form: one including set of checkboxes in a table, with a customized display, like the core user, content or modules administration forms. So follow me while we build this example.
Grokking Drupal: module dependencies in e-Commerce 4
Submitted by fgm on Tue, 2008-07-29 13:35Roughly two years ago, I prepared a diagram of the dependencies in the then-current version of Drupal e-Commerce (eC) for Drupal 4.6.
Now, with other eC projects looming ahead, a
possible session about eC at Szeged,
and eC 4 being in alpha, I figured it was time to update the model. Boy, has it changed ! Click the thumbnail for the full-size view.
Deprecating img_relocator
Submitted by fgm on Tue, 2008-05-06 18:38In summer 2006, I created the img_relocator module, which was published to my sandbox, and apparently picked up by some Drupal admins, although it was never promoted to full-fledged project status.
When e-commerce won't create products ...
Submitted by fgm on Mon, 2008-04-28 16:55I was working on an existing site today, and after installing the e-commerce 3.4 suite (EC), noticed something was very weird: product type modules were enabled, all basic EC modules were there too, and yet, when I created products by hand, the "Anonymous purchase" fieldset appeared, but nothing else from EC.
Worse, when saving the new products, they were properly created in the {node} table, but never appeared in the {ec_product} table, which caused them never to appear as products in the admin products list of the product view available to users. What could be going on ?





Recent comments
12 weeks 4 days ago
14 weeks 4 days ago
15 weeks 5 days ago
16 weeks 1 day ago
16 weeks 1 day ago
16 weeks 1 day ago
24 weeks 6 days ago
25 weeks 2 hours ago
27 weeks 12 hours ago
27 weeks 5 days ago