The next issue that came up regards the assignment of $node->quotes_author to the default value of the $form['body_field']['quotes_author'] array. This issue arises when one goes to add a new quote. The watchdog message was:

notice: Undefined property: stdClass::$quotes_author in quotes_form() (line 1697 of /home/toomreco/drupal-6.20/sites/all/modules/quotes/quotes.module).

When the user first enters a blank version of the form, the property $node->quotes_author does not yet exist. I resolved my local version of the quotes module by including the following around line 1697:

  $author = '';
  if (isset($node->quotes_author)) {
    $author = $node->quotes_author;
  }
  $form['body_field']['quotes_author'] = array(
    '#type' => 'textfield',
    '#title' => t('Author'),
    '#autocomplete_path' => 'quotes/autocomplete/author',
    '#rows' => 1,
    '#maxlength' => 1023,
    '#default_value' => $author,
    '#description' => t('This is who is credited for the quotation.') . $no_import,
    );

Again, this check for the existence of $node->quotes_author probably should be incorporated into the dev version of the module as well.

Similarly, I also received the error message:

notice: Undefined property: stdClass::$quotes_citation in quotes_form() (line 1707 of /home/toomreco/drupal-6.20/sites/all/modules/quotes/quotes.module).

This I resolved with the following code around what then was line 1707:

  $citation = '';
  if (isset($node->quotes_citation)) {
    $citation = $node->quotes_citation;
  }
  $form['body_field']['quotes_citation'] = array(
    '#type' => 'textfield',
    '#title' => t('Citation'),
    '#autocomplete_path' => 'quotes/autocomplete/citation',
    '#rows' => 1,
    '#maxlength' => 1023,
    '#default_value' => $citation,
    '#description' => t('This is the source (book, magazine, etc.) of the quote.') . $no_import,
    );

Cheers!!

Comments

pillarsdotnet’s picture

ctmattice1’s picture

Status: Active » Fixed

fixed in next dev release

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.