I'm building a website for a local gym. Here is the setup in question.

  • I have a taxonomy called "tags".
  • It has a field called "field_demonstration".
  • I have a custom view mode for the taxonomy called "View mode: Exercise demonstration".
  • It displays only the "field_demonstration" field.

In my node I use hierarchical select so that a user may choose the associated exercise from the tags vocabulary. The idea is that the associated demonstration videos will then be displayed along with the page (screenshot). Everything displays correctly if I use one of the provided formatters "Hierarchical text", "Hierarchical links", "Links", "Plain text", "View mode: Taxonomy term page", "View mode: Tokens".

However if I use my own formatter "View mode: Exercise demonstration", I get the following errors.

Notice: Undefined index: #taxonomy_term in ds_extras_render_panel_layout() (line 904 of C:\xampp\htdocs\playground2\sites\all\modules\ds\modules\ds_extras\ds_extras.module).
EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7405 of C:\xampp\htdocs\playground2\includes\common.inc).
CommentFileSizeAuthor
#3 1360480-3.patch735 bytesswentel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dazz’s picture

I get the same error, only the Notice: Undefined index is on line 905

swentel’s picture

Status: Active » Fixed
FileSize
735 bytes

Sorry for getting so slow on this. Patch attached and committed/pushed. Thanks for the clear steps for reproducing!

dazz’s picture

After applying the patch the error was gone but it didn't display the term either.

I use this code:

$term = taxonomy_term_view($element, 'full');
print(render($term));

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Spelling