Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP fatal on install (autoloader not loading feeds classes) #12

Closed
jenlampton opened this issue Aug 28, 2018 · 3 comments
Closed

PHP fatal on install (autoloader not loading feeds classes) #12

jenlampton opened this issue Aug 28, 2018 · 3 comments

Comments

@jenlampton
Copy link
Member

jenlampton commented Aug 28, 2018

For some reason the autoloader isn't loading the feeds classes on my site. I've tried changing PHP versions to no avail. When I attempt to enable the Feeds module, at the moment I save the modules page I get the following error:

Error: Class 'FeedsConfigurable' not found in feeds_importer() (line 1066 of backdrop/modules/contrib/feeds/feeds.module).

When I add a manual call to load the file, this class is found, but the next one is not:

  module_load_include('inc', 'feeds', 'includes/FeedsConfigurable');

I then get the following error:

Fatal error: Class name must be a valid object or a string in backdrop/modules/contrib/feeds/includes/FeedsConfigurable.inc on line 64

I was able to get around the second PHP fatal by wrapping the return of the instance with a check for class:

    if (!empty($class)) {
      if (!isset($instances[$class][$id])) {
        $instances[$class][$id] = new $class($id);
      }
      return $instances[$class][$id];
    }

But I'm still not sure why any of this was necessary...

@jenlampton jenlampton changed the title PHP fatal on install PHP fatal on install (autoloader not loading feeds classes) Aug 28, 2018
@laryn
Copy link
Member

laryn commented May 2, 2019

I just installed feeds and did not get the first error after enabling the module, but got the second error when trying to add a new Feed importer. I tried your fix above (if (!empty($class)) { ... and then tried to create an importer. That gave me this error:

Error: Call to a member function configFormValidate() on null in feeds_ui_create_form_validate() (line 193 of /path/modules/feeds/feeds_ui/feeds_ui.admin.inc).

The strange thing is, I believe I've installed and used Feeds on a different site without this issue.

@laryn
Copy link
Member

laryn commented May 6, 2019

Ignore my comment above, it seems related to the fact that this was an upgrade. I've pulled it out as a separate issue.

@herbdool
Copy link
Collaborator

herbdool commented Nov 6, 2019

Can't replicate either.

@herbdool herbdool closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants