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.
Comment | File | Size | Author |
---|---|---|---|
#18 | 1116602-nonfieldable-entities-d7.patch | 530 bytes | valthebald |
Comments
Comment #1
carlos.macao CreditAttribution: carlos.macao commentedThe same for me.
Comment #2
valthebaldPls check latest 7.x-1.x-dev, should be fixed
Comment #3
carlos.macao CreditAttribution: carlos.macao commentedOk, 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).
Comment #4
Dave Reid@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.
Comment #5
valthebaldComment #6
jeffwidman CreditAttribution: jeffwidman commentedI 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).
Comment #7
valthebaldPlease check response #4
Comment #8
Dave ReidThe error in #6 is not related to my comment in #4...
Comment #9
jeffwidman CreditAttribution: jeffwidman commentedThx Dave--I was fairly sure my error was tied to the original issue.
Comment #10
jeffwidman CreditAttribution: jeffwidman commentedComment #11
valthebaldAs 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?
Comment #12
TripX CreditAttribution: TripX commentedIn 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...
Comment #13
valthebaldJust found this core issue: #1121468: Notice when managing fields for entities with no fields attached.
In short: this may be annoying, but it won't hurt
Seems other modules also suffer from this: #1097766: Undefined index: og_membership in field_info_instances(), #1130734: Notice: Undefined index: profile2 in field_info_instances()
Comment #14
john.oltman CreditAttribution: john.oltman commentedI've patched my own copy with this because I've only added meta tags to nodes and not users and taxonomy etc.
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.
Comment #15
valthebaldThat'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
Comment #16
Dave ReidActually 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']) { ... }
Comment #17
valthebald#16 That makes sense. Will supply a patch soon and see if that solves the problem
Comment #18
valthebaldWhen 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.
Comment #19
john.oltman CreditAttribution: john.oltman commentedConfirmed, 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.
Comment #20
valthebaldCommitted to 7.x-1.x-dev