I have the latest pathauto dev version and the latest path redirect dev version. I configured to create a redirect upon creating a new path alias. This works but I get this error from the meta tags quick module:

Notice: Undefined index: redirect in field_info_instances() (line 685 of /home/johnny/workspace/Drupal 7.0/modules/field/field.info.inc).
Warning: Invalid argument supplied for foreach() in metatags_quick_entity_load() (line 55 of /home/johnny/workspace/rm.dev.internetunlimited.nl/modules/drupal.org/metatags_quick/metatags_quick.module).

I'm also using the latest version of the meta tags quick module.

CommentFileSizeAuthor
#18 1116602-nonfieldable-entities-d7.patch530 bytesvalthebald
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

carlos.macao’s picture

The same for me.

valthebald’s picture

Assigned: Unassigned » valthebald
Status: Active » Needs review

Pls check latest 7.x-1.x-dev, should be fixed

carlos.macao’s picture

Ok, but now when I go to admin/config/search/redirect I get errors like this:

Notice: Undefined index: last_used em redirect_list_form() (linha 88 de /usr/home/formacao/www/sites/all/modules/redirect/redirect.admin.inc).

Dave Reid’s picture

Status: Needs review » Fixed

@carlos.macao: Make sure to run update Redirect.module to the latest 7.x-1.x and run update.php afterwards. Your error in #3 doesn't really have anything to do with metatags_quick.

valthebald’s picture

Version: 7.x-1.x-dev » 7.x-1.4
jeffwidman’s picture

I have the latest dev version installed for meta tags, and still get this error when i enable the meta tags module.

When I disable the module, the error stays there until I uninstall (this appears to leave the folder, but remove the data from the tables.) Once I uninstall the error disappears.

Notice: Undefined index: redirect in field_info_instances() (line 685 of /pagelever.com/modules/field/field.info.inc).

valthebald’s picture

Please check response #4

Dave Reid’s picture

The error in #6 is not related to my comment in #4...

jeffwidman’s picture

Thx Dave--I was fairly sure my error was tied to the original issue.

jeffwidman’s picture

Status: Fixed » Needs work
valthebald’s picture

As far as I can see from field.info.inc, error means that there is field instance, which belongs to 'redirect' entity (exposed by redirect module), but has no bundle.
However, I couldn't reproduce the error using redirect 1.0-beta2 + metatags_quick 1.6 combination.
What versions do you have on your installation?

TripX’s picture

In my mind, this has to be moved to FIELD.

I get the same error code (line 685). In my mind it has nothing to do with metatags...

valthebald’s picture

Version: 7.x-1.4 » 7.x-1.x-dev
Status: Needs work » Fixed
john.oltman’s picture

I've patched my own copy with this because I've only added meta tags to nodes and not users and taxonomy etc.

if ($type == 'node') {
... what is currently in metatags_quick_entity_load() goes here ...
}

This gets rid of the error message when the redirect module is installed and meta tags continue to inject into the front page and nodes as expected. If you are using this for other fieldable entities like user and taxonomy, then this work around could be extended for those entities.

valthebald’s picture

That's ok, if you know for sure that you need meta tags only for nodes.
In general, you may need meta tags also in other entities, most notably taxonomy terms

Dave Reid’s picture

Actually what might be the problem here, is this code is running for entity types that are not even fieldable, like redirects. The code should probably be checking $info = entity_get_info($type); if ($info['fieldable']) { ... }

valthebald’s picture

Title: Bug upon redirect » Don't fetch entity data for non-fieldable entities
Status: Fixed » Needs work

#16 That makes sense. Will supply a patch soon and see if that solves the problem

valthebald’s picture

Status: Needs work » Needs review
FileSize
530 bytes

When hook_entity_load is called, entity info is already loaded,
so I believe this patch will have minimal performance impact.
Anyone please confirm notices have gone.

john.oltman’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed, my notices are gone after replacing my workaround with the patch. They come back immediately if I comment out the patch. Thanks guys, this is a better solution.

valthebald’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x-dev

Status: Fixed » Closed (fixed)

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