I am using 'Drupal 7.0 (2011-Jan-05)' in combination with about 60 additional/optional and up-to-date modules. After downloading and activating 'similarterms 7.x-1.0-alpha2 (2010-Aug-04)' I get the following PHP error messages on the front page and all other pages:

* Notice: Undefined index: render element in theme() (Zeile 811 von /var/www/site.net/includes/theme.inc).
* Notice: Undefined variable: items in include() (Zeile 15 von /var/www/site.net/sites/all/modules/similarterms/similarterms.tpl.php).

And when accessing a specific node there appears only a blank nothingness.

Using the current dev version 'similarterms 7.x-1.x-dev' is not a solution for me either, since this one seems to create a row of 'stdClass' problems (PHP error messages).

By the way, in your module description you are mentioning the creation of a vocabulary called 'tags'. Do you really mean that one has to create a vocabulary with exactly this name (it cannot be named differently?)?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Blooniverse’s picture

'similarterms 7.x-1.x-dev (2010-Aug-04)' — to be precise!

KirstenLangholz’s picture

I ran into the same problems. Any help in sight?

EliteMonk’s picture

I install both version alpha2 and dev

and after indtall i see error

Notice: Undefined property: stdClass::$multiple in function similarterms_block_info() (строка 65 в файле /home/notafa/public_html/sites/all/modules/similarterms/similarterms.module).
Notice: Undefined property: stdClass::$tags in function similarterms_block_info() (строка 65 в файле /home/notafa/public_html/sites/all/modules/similarterms/similarterms.module).
Notice: Undefined property: stdClass::$multiple in function similarterms_block_info() (строка 65 в файле /home/notafa/public_html/sites/all/modules/similarterms/similarterms.module).
Notice: Undefined property: stdClass::$tags in function similarterms_block_info() (строка 65 в файле /home/notafa/public_html/sites/all/modules/similarterms/similarterms.module).

Blooniverse’s picture

... no [good] news here?

dropbydrop’s picture

I have the same.
Any new version around?
there was a pledge about

Sean-Khan’s picture

Same problem here...

anruether’s picture

subscribe

Blooniverse’s picture

Title: Undefined index » Undefined index | Undefined property: stdClass::$multiple (still existing!)
Version: 7.x-1.0-alpha2 » 7.x-1.x-dev

Oh, what a pitty: 'Similar By Terms 7.x-1.x-dev (2011-Feb-25)' does not solve any of the described errors above.

There is still (on views, /node* & /user*):

# Notice: Undefined index: render element in theme() (line 811 of /var/www/testli/includes/theme.inc).
# Notice: Undefined variable: items in include() (line 14 of /var/www/testli/sites/all/modules/similarterms/similarterms.tpl.php).

And (on e.g. '/admin/modules' or '/admin/structure/block'):

* Notice: Undefined property: stdClass::$multiple in similarterms_block_info() (line 64 of /var/www/testli/sites/all/modules/similarterms/similarterms.module).
* Notice: Undefined property: stdClass::$tags in similarterms_block_info() (line 64 of /var/www/testli/sites/all/modules/similarterms/similarterms.module).
* Notice: Undefined property: stdClass::$multiple in similarterms_block_info() (line 64 of /var/www/testli/sites/all/modules/similarterms/similarterms.module).
* Notice: Undefined property: stdClass::$tags in similarterms_block_info() (line 64 of /var/www/testli/sites/all/modules/similarterms/similarterms.module).
Blooniverse’s picture

A brief and superficial look into 'similarterms.tpl.php' reveals quite clearly the culprit: it is the $items array. But there is no quick fix for that, cause even a modification of line#14 into if (is_array($items) ) { doesn't solve the problem. Since I am not a maintainer of this module and I am lacking in time, I need to give up here -- sorry! Below the mentioned code:

<?php
if ($items) {
$items_ls = array();
  if ($display_options == 'title_only') {
    foreach ($items as $node) {
      $items_ls[] = l($node->title, 'node/'. $node->nid);
    }
    print theme('item_list', $items_ls);
  }
  if ($display_options == 'teaser') {
    $output = '';
    foreach ($items as $node) {
      $output .= '<li>'. l($node->title, 'node/'. $node->nid);
      $output .= ' - '. $node->teaser;
      $output .= "</li>\n";
    }
    if ($output) {
      echo "<ul>" . $output . "</ul>";
    }
  }
}
?>
Blooniverse’s picture

... this function is from 'similarterms.module'. It is the one which creates the $items array. Maybe someone can find the flaw by briefly having a look at the code?:

<?php
function  similarterms_menu() {
  // Admin settings for the site.
  $items['admin/settings/similarterms'] = array(
    'title' => 'Similar By Terms',
    'description' => 'Basic Settings for similar term most settings are in the blocks config.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('similarterms_admin_settings'),
    'file' => 'similarterms.admin.inc',
    'access arguments' => array('administer site configuration'),
    'type' => MENU_NORMAL_ITEM, // optional
  );
  return $items;
}
?>
pazap47’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha2

Just installed same problem as mentioned here, but it's not the only module with problems, sorry just personal opinion.

Blooniverse’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev

... indicate the error for the most current module version -- please don't change this setting [back in time]!

Letharion’s picture

Title: Undefined index | Undefined property: stdClass::$multiple (still existing!) » Module doesn't properly check if data exists
Priority: Major » Normal
FileSize
627 bytes

Line 64 does if($v->multiple || $v->tags).
This has the intended effect, that is, running only if at least one exists, but causes notices.
Attaching patch with isset() added.

Letharion’s picture

Status: Active » Needs review
rmiddle’s picture

#13 commit into tree. Will be in alpha 3 release that is hopefully working.

Thanks
Robert

rmiddle’s picture

#13 removed from module completely. Taxo changed in 7 making support for the option to heavy to be worth supporting it any-more.

Next Commit will clear up the error.

Thanks
Robert

rmiddle’s picture

Alpha4 is released that fixes the issues listed above please upgrade to alpha4 and report any new issues with alpha 4.

Thanks
Robert

rmiddle’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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