##

Don’t use header() or die().

die() also stops cron. Beware.

There is this function named “l”. Poor l().

“admin_menu/flush-cache” is useful.

cron reminder:
    .---------------- minute (0 - 59) 
    |   .------------- hour (0 - 23)
    |   |   .---------- day of month (1 - 31)
    |   |   |   .------- month (1 - 12) OR jan,feb,mar,apr ... 
    |   |   |   |  .----- day of week (0 - 7) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat 
    |   |   |   |  |
    *   *   *   *  *  command to be executed

Basically something like $_SERVER[‘SERVER_NAME’] . $_SERVER[‘SCRIPT_NAME’] == /admin doesn’t work here because everything goes through index.php so you need to use arg, a Drupal API.

“Image thumbnail not able to be created” - 90% of the time it’s permission problem.

I tried to activate the Views module and got this error: Fatal error: Call to a member function override_option() on a non-object in /***/***/public/sites/all/modules/ubercart/uc_product/views/uc_product.views_default.inc on line 74 The solution? Disable and re-enable Views. Not sure why it fixed the problem but it did.

Modules

  1. first, make a new view, type node
  2. then, make a new display of the node: page
  3. then add a filter, node:published > yes
  4. then add another filter, node:type > images (whatever your type is)
  5. now add a field, the name of your image field
  6. at the bottom of the add field form, it will offer you display options, select the imagecache preset you like
  7. can also add the title field to the view

Commerce

When helping somebody setup a shopping cart like Ubercart, make sure they have a SSL setup. Otherwise don’t bother if there is any resistance. Use Let’s Encrypt.