It's causing a race condition on cache clear.

Warning: Invalid argument supplied for foreach() in /var/www/d7/code/sites/all/modules/redirect/redirect.module on line 1444
Notice: Undefined index: bundles in /var/www/d7/code/sites/all/modules/redirect/redirect.module on line 1444

See #1416558: hook_entity_info(), hook_schema(), and the field system are strongly bound to each other for the core issue.

CommentFileSizeAuthor
#9 1441488-bundle-empty-check.patch1.6 KBtomsegarra

Comments

dave reid’s picture

I'm not sure how this could be worked around? I haven't ever experienced this error in local testing so maybe it's another module added in the picture that is causing the actual cache conflict?

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)
tim.plunkett’s picture

I really have no more insight into this, except Damien's issue seemed to pretty clearly explain the behavior I was seeing.

Also using File Entity, Media 2.x, Entity, Entity Reference on the site.

dave reid’s picture

Status: Postponed (maintainer needs more info) » Active

Hrm. This is frustrating.

geek-merlin’s picture

Status: Needs review » Active

huh, this is a major PITA as it is quite natural to list call entity_get_info() from inside hook_field_extra_fields() to get a list of entities.

tried this with a module today and kadong, the site is in WSOD state and i found NO way to revive it: disabling the module and "drush cc all" does not help
(beware: my experiment is no 100% smoking-gun proof as there are some other modules on the site, but only well proven ones)

i don't want to take the power out of solving this major issue radically, but some people may be thankful for
* a way to revive a site that broke due to this
* a way to get an entity listing without entity_get_info()

EDIT: don't trust the above too much. good chance entityrefrence broke my site.

geek-merlin’s picture

Status: Active » Needs review

would be nice to review the above idea.
for a mid-term tool approach see #1450612: Dataflow browser for hooks system

dave reid’s picture

Nothing to review.

dave reid’s picture

tomsegarra’s picture

Status: Active » Needs review
StatusFileSize
new1.6 KB

The only major difference between this implementation of hook_field_extra_fields() and the one in the Metatag module is that Metatag checks whether $entity_info['bundles'] is empty. Since the error message in the original issue report complains about "Undefined index: bundles", it seems appropriate to add a similar check here.

Given that there's really only one reliable report of this problem, that Metatag has almost the same code ostensibly working fine in a full release, and that this issue has been helping prevent a stable release of Redirect for three years now, I propose that adding this variable check is sufficient mitigation until further reports arise.

chris matthews’s picture

...and that this issue has been helping prevent a stable release of Redirect for three years now, I propose that adding this variable check is sufficient mitigation until further reports arise.
+1 to ^

The patch in #9 applied cleanly to redirect.module 7.x-1.x-dev and looks like a clean fix, but it would be good to get at least 1 other review/test before changing the status to RTBC.

chris matthews’s picture

This issue is a child of #2514248: Plan for Redirect v7.x-1.0 release. Should it continue to be blocker for a full 7.x-1.0 release of redirect?

euk’s picture

Hello!

I applied patch in #9 and all seems to be working fine. Cache clear works without issues. Is there anything else to test?

Considering it's been about a year since the latest patch was uploaded - I believe the fix is good to go.

tomsegarra’s picture

Status: Needs review » Reviewed & tested by the community

We've got two independent reviews here, and for an issue of this size I think that qualifies as RTBC.

pifagor’s picture

  • pifagor committed 03ce535 on 7.x-1.x authored by tomsegarra
    Issue #1441488 by tomsegarra, Dave Reid, tim.plunkett, geek.merlin aka...

  • pifagor committed 4ff536d on 7.x-2.x
    Issue #1441488 by tomsegarra, Dave Reid, tim.plunkett, geek.merlin aka...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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