Mario. Web Developer, Snowboarding Addict

drupal7

Error message

  • Notice: Undefined index: default_image in image_field_prepare_view() (line 207 of /home/drupal7/drupal-7.10/modules/image/image.field.inc).
  • Notice: Undefined index: default_image in image_field_prepare_view() (line 207 of /home/drupal7/drupal-7.10/modules/image/image.field.inc).
  • Notice: Undefined index: default_image in image_field_prepare_view() (line 207 of /home/drupal7/drupal-7.10/modules/image/image.field.inc).
  • Notice: Undefined index: default_image in image_field_prepare_view() (line 207 of /home/drupal7/drupal-7.10/modules/image/image.field.inc).

Drupal get raw SQL query

Drupal's database abstraction layer is pretty cool, but sometimes unexpected results on complicated queries can do your head in, so it's nice to be able to see the final SQL statement Drupal is planning on running.

Tags:  drupal7 tidbit mysql

Drupal embed node form in custom form

Embedding the node add/edit form is pretty easy, but what if you want a new and improved node form, with some of your excellent additions/modifications, without messing around with the core node//edit form?

Tags:  drupal7 tidbit

Drupal 'Undefined index: distribution_name' issue

Was migrating a few sites between Drupal-7.7 and Drupal-7.10 platforms and came across the following PHP notice:

Notice: Undefined index: distribution_name in drupal_install_profile_distribution_name() (line 202 of /srv/drupal-7.10/includes/install.inc).

Tags:  drupal7 tidbit

Add custom view modes in Drupal 7

You can add extra display modes using hook_entity_info_alter.

Say you have a custom module 'myModule' and want to add a custom view to the node entity:

Tags:  tidbit drupal7