Recently migrated from Drupal 6 to 7.

  1. Uncompressed Views Bulk Operations and Administrative Views in modules pathway - have not enabled yet.
  2. Went to update.php

Following errors were reported:

Notice: Undefined offset: 0 in taxonomy_field_views_data() (line 401 of /var/www/html/sites/all/modules/views/modules/taxonomy.views.inc).
Notice: Undefined offset: 0 in taxonomy_field_views_data() (line 401 of /var/www/html/sites/all/modules/views/modules/taxonomy.views.inc).

Any advice on how to troubleshoot, what it means and how to make it go away will be greatly appreciated.

Thanks,
Ace

Comments

dawehner’s picture

You seems to have a field without a vocabulary setup, this might have been a problem with your migration process.

In general there were multiple issues about this problem already and it is always a question whether hiding an error is better then showing one, which gives you the hint that something might be wrong.

Avalanche’s picture

That makes a lot of sense - and I have an idea of which content types might be the problem.

I'll post an update and close the ticket out once I chase down the culprit.

Thanks dawehner

nsjski’s picture

I saw this too, found a field called taxonomyextra, had been created by taxonomy upgrade, belonged to one of my content types but the field was not used, I deleted the field and the error message went away.

Melissamcewen’s picture

Visiting the edit fields page of the offending content type cleared this error for me.

Melissamcewen’s picture

Just kidding, still having this issue.

jessZ’s picture

Issue summary: View changes

Notice: Undefined offset: 0 in taxonomy_field_views_data() (line 433 of /home/reimagi8/public_html/new/sites/all/modules/views/modules/taxonomy.views.inc).

I also have the "field called taxonomyextra, had been created by taxonomy upgrade," but unfortunately it includes all the old gallery taxonomy terms and they didn't migrate to the new "image gallery" term and only the legacy terms show up on the nodes (over 1500 of them).

Is their a way i can change this field so it has a parent and i can then delete the unnecessary ones via the UI for taxonomy.

nimazuk’s picture

subscribing!

Hetta’s picture

To migrate taxonomyextra terms into their correct vocabularies, you have to run below sql for each vocabulary.

Back up your database before you start, because this can mess things up quite royally:

insert into `field_data_taxonomy_vocabulary_1` 
(`field_data_taxonomy_vocabulary_1`.`entity_type`,
`field_data_taxonomy_vocabulary_1`.`bundle`,
`field_data_taxonomy_vocabulary_1`.`deleted`,
`field_data_taxonomy_vocabulary_1`.`entity_id`,
`field_data_taxonomy_vocabulary_1`.`revision_id`,
`field_data_taxonomy_vocabulary_1`.`language`,
`field_data_taxonomy_vocabulary_1`.`delta`,
`field_data_taxonomy_vocabulary_1`.`taxonomy_vocabulary_1_tid`)
SELECT distinct
`field_data_taxonomyextra`.`entity_type`,
`field_data_taxonomyextra`.`bundle`,
`field_data_taxonomyextra`.`deleted`,
`field_data_taxonomyextra`.`entity_id`,
`field_data_taxonomyextra`.`revision_id`,
`field_data_taxonomyextra`.`language`,
`field_data_taxonomyextra`.`delta`,
`field_data_taxonomyextra`.`taxonomyextra_tid`
 FROM `field_data_taxonomyextra` 
INNER JOIN `field_data_taxonomy_vocabulary_1`, `taxonomy_term_data`
 WHERE  `field_data_taxonomyextra`.`taxonomyextra_tid`= `taxonomy_term_data`.`tid`
   AND  `taxonomy_term_data`.`vid` = 1

;

DELETE `field_data_taxonomyextra`
 FROM `field_data_taxonomyextra` 
INNER JOIN  `taxonomy_term_data`
    ON `field_data_taxonomyextra`.`taxonomyextra_tid`= `taxonomy_term_data`.`tid`
   WHERE `taxonomy_term_data`.`vid` = 1

Also do this for the _revision_ tables:

insert into `field_revision_taxonomy_vocabulary_1` 
(`field_revision_taxonomy_vocabulary_1`.`entity_type`,
`field_revision_taxonomy_vocabulary_1`.`bundle`,
`field_revision_taxonomy_vocabulary_1`.`deleted`,
`field_revision_taxonomy_vocabulary_1`.`entity_id`,
`field_revision_taxonomy_vocabulary_1`.`revision_id`,
`field_revision_taxonomy_vocabulary_1`.`language`,
`field_revision_taxonomy_vocabulary_1`.`delta`,
`field_revision_taxonomy_vocabulary_1`.`taxonomy_vocabulary_1_tid`)
SELECT distinct
`field_revision_taxonomyextra`.`entity_type`,
`field_revision_taxonomyextra`.`bundle`,
`field_revision_taxonomyextra`.`deleted`,
`field_revision_taxonomyextra`.`entity_id`,
`field_revision_taxonomyextra`.`revision_id`,
`field_revision_taxonomyextra`.`language`,
`field_revision_taxonomyextra`.`delta`,
`field_revision_taxonomyextra`.`taxonomyextra_tid`
 FROM `field_revision_taxonomyextra` 
INNER JOIN `field_revision_taxonomy_vocabulary_1`, `taxonomy_term_data`
 WHERE  `field_revision_taxonomyextra`.`taxonomyextra_tid`= `taxonomy_term_data`.`tid`
   AND  `taxonomy_term_data`.`vid` = 1

;

DELETE `field_revision_taxonomyextra`
 FROM `field_revision_taxonomyextra` 
INNER JOIN  `taxonomy_term_data`
    ON `field_revision_taxonomyextra`.`taxonomyextra_tid`= `taxonomy_term_data`.`tid`
   AND `taxonomy_term_data`.`vid` = 1

Once your taxonomyextra table is completely empty, you can go to each of your content types and delete the taxonomyextra field.
(your server) /admin/structure/types
For image, for instance:
(your server) /admin/structure/types/manage/image/fields
-> taxonomyextra (click delete).

Now the "undefined offset" warning is gone.