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

CommentFileSizeAuthor
#4 feeds-class-not-found-3165234-4.patch1.03 KBmegachriz

Comments

paul_constantine created an issue. See original summary.

megachriz’s picture

Status: Active » Postponed (maintainer needs more info)

I think you should just clear caches after updating?

thanhdo1991’s picture

I 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.

megachriz’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.03 KB

Does it help if you apply this patch and then run database updates again? Or do you get a warning then?

hdbonnett’s picture

The patch in #4 resolved this issue for me after I cleared all caches.

alysaselby’s picture

I 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.

darrick’s picture

I 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.

wylbur’s picture

Also just wanted to add that we ran into the same error log messages, and clearing the caches on Pantheon cleared up those messages.

solideogloria’s picture

Version: 7.x-2.0-beta5 » 7.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

I agree that a registry rebuild is the right way, because I've used this: https://www.drupal.org/project/registry_rebuild

yasheshb’s picture

#2 worked for me. thank you.

#2

$ drush cc all

and then it worked fine.

joelpittet’s picture

@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?

megachriz’s picture

@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.

bluegeek9’s picture

Status: Reviewed & tested by the community » Closed (outdated)

Drupal 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!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.