I just ran into the same issue with a combination of feeds+rules. I think it was the ctools registry rebuild problem + the entity/rules upgrade problem at the same time + I had #1005128: Rules integration & enable modules to customize imports applied which might worse the situation as it relates feeds with rules.. ;)

So with the provided registry rebuild.php script my site was still broken with feeds unable to find its includes. The following rebuild.php solved it for me:

/**
* @file
*   Fix the registry to rebuild properly.
*/

/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
define('MAINTENANCE_MODE', 'update');

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// Add this line right here:
registry_rebuild();
menu_execute_active_handler();

Just place in your drupal root and run yoursite/rebuild.php once - that repaired for me. Afterwards clear caches.

Note the MAINTENANCE_MODE define, which avoids invoking hook_init() - maybe this would be a good addition to the module?

CommentFileSizeAuthor
#5 registry_rebuild.add_maint_mode.patch389 bytesrfay

Comments

rfay’s picture

Thanks! Actually, a fix just went into feeds that ought to affect this. Feeds was not listing class-containing files in the .info file. I had the same problem with it the other day. See #1201638: Plugins should be listed in info file

I'm a little baffled about your recommendation though, because the current code has the extra registry_rebuild():


print "Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION<br/>\n";
registry_rebuild();   // At lower level

print "Bootstrapping to DRUPAL_BOOTSTRAP_FULL<br/>\n";
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
print "Doing registry_rebuild() in DRUPAL_BOOTSTRAP_FULL<br/>\n";
registry_rebuild();
$parsed_after = registry_get_parsed_files();

print "Flushing all caches<br/>\n";
drupal_flush_all_caches();

print "There were " . count($parsed_before) . " files in the registry before and " . count($parsed_after) . " files now.<br/>\n";
print "If you don't see any crazy fatal errors, your registry has been rebuilt.<br/>\n";
fago’s picture

I'm not sure why, but it didn't work in my case. Probably just the full-bootstrap rebuild would have solved the problem finally, but that didn't work as rules_init() was called, which triggered rebuilding the rules cache, what triggered getting feeds-rules-events, what triggered accessing feed plugins - which still were broken.

When thanks to the maintenance define no hook_init() is invoked, it works.

rfay’s picture

I just noticed that you added

define('MAINTENANCE_MODE', 'update');

Do you think that mattered?

fago’s picture

>When thanks to the maintenance define no hook_init() is invoked, it works.

Yes! ;)

rfay’s picture

Status: Active » Needs review
StatusFileSize
new389 bytes

Added the maintenance mode line.
Committed: 42109a93e639936a528b886f92211ebd685610a8

This will be in the dev release. Will be interested if the dev release solves anything for people that the 1.1 doesn't.

rfay’s picture

This is in the 7.x-1.2 release.

rfay’s picture

Status: Needs review » Fixed

I'm going to call this fixed.

I'm *very* interested in getting a database (and optionally a tarball) from anybody that gets stuck in this situation.

@fago, if you have a dump of the broken database you had trouble with, I'd appreciate having that (or having you try 7.x-1.2 on it to see if this does the trick).

fago’s picture

>@fago, if you have a dump of the broken database you had trouble with, I'd appreciate having that (or having you try 7.x-1.2 on it to see if this does the trick).

Sry, I don't have a dump :(

Status: Fixed » Closed (fixed)

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