Problem/Motivation
After upgrading from feeds beta4 to feeds beta5 feeds does not work anymore.
The following error is shown in my recent log messages:
Error: Class 'FeedsAccountSwitcher' not found in FeedsSource->__construct() (line 300 of /var/www/html/www.mydomain.com/htdocs/sites/all/modules/feeds/includes/FeedsSource.inc).
Had to downgrade to the beta4 to get my system working again. I use feeds to create pages for a webradio station for each song that is played. Been working perfect for 2 years until today.
I use the following modules with feeds:
- Feeds 7.x-2.0-beta4
- Feeds Admin UI 7.x-2.0-beta4
- Feeds extensible parser 7.x-1.0-beta2
- Feeds Fetcher Directory 7.x-2.0-beta6
- Job Scheduler 7.x-2.0
Outside Drupal I use DRUSH and Incron to trigger the page generation every time new song meta info is uploaded via RSS.
Regards
Paul
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | feeds-class-not-found-3165234-4.patch | 1.03 KB | megachriz |
Comments
Comment #2
megachrizI think you should just clear caches after updating?
Comment #3
thanhdo1991 commentedI see this issue too on my host (pantheon) but don't see it on my local.
I tried clear cache and run update db more two times.
Comment #4
megachrizDoes it help if you apply this patch and then run database updates again? Or do you get a warning then?
Comment #5
hdbonnett commentedThe patch in #4 resolved this issue for me after I cleared all caches.
Comment #6
alysaselby commentedI too had the same issue and I am on Pantheon. Flushing caches through the website cleared the problem for me. I use Docker and DDEV for module updates, etc. I did not need to apply the patch.
Comment #7
darrick commentedI cleared all cache with drush twice. Then drush updatedb twice (said no updates). And lastly restarted apache. Then I checked and all seems working okay.
Comment #8
wylbur commentedAlso just wanted to add that we ran into the same error log messages, and clearing the caches on Pantheon cleared up those messages.
Comment #9
solideogloria commentedI agree that a registry rebuild is the right way, because I've used this: https://www.drupal.org/project/registry_rebuild
Comment #10
yasheshb commented#2 worked for me. thank you.
#2
and then it worked fine.
Comment #11
joelpittet@MegaChriz the line checking
!module_exists('feeds')in feeds looks suspect, what's the intention or scenario for that to be true? Like why would feeds not be enabled when it's running it's updates?Comment #12
megachriz@joelpittet
In D7, database updates can be done for modules that are disabled. If in this case the Feeds module is disabled, its classes cannot be found.
Hm, if I look at the code, maybe it isn't important whether or not FeedsAccountSwitcher exists or not. You won't need it when Feeds is disabled. But I wonder if at a time when Feeds gets enabled again, the class registry gets updated? If so, then
feeds_update_7214()could just bail out when Feeds is disabled. Not sure though if enabling a already installed module triggers a registry rebuild. I would think that would only happen on a module install.Comment #13
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!