I try to create a custom fetcher in Drupal 8 and have followed the description on:
https://www.drupal.org/docs/8/modules/feeds/creating-a-custom-feeds-work...

The fetcher shows up but when I hit the save button I receive this errror, and I don't know what it means.

"Plugin (auth_http) instance class "Drupal\http_auth_fetcher\Feeds\Fetcher\AuthHTTPFetcher" does not exist in "Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass()" (line 97 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php)

I tried to extend the HttpFetcher, but have also tried the example (copy and paste) from the link above with the exact same result.

Could anyone help me?

Comments

johsve339 created an issue. See original summary.

megachriz’s picture

Status: Active » Fixed

Check if the class name and the file name exactly matches. Also check if the namespace matches the folder structure.

So the class "Drupal\http_auth_fetcher\Feeds\Fetcher\AuthHTTPFetcher" is expected to be found in http_auth_fetcher/src/Feeds/Fetcher/AuthHTTPFetcher.php.

Note: the Drupal coding standards recommend to not uppercase abbrevations. So to obey to these standards, the class should be named AuthHttpFetcher instead (this has nothing to do with the error that you reported).

johsve339’s picture

Thanks, I was a stupid misstake of me in the name space.

module called "http_auth_fetcher" and namespace was "Drupal\auth_http_fetcher\Feeds\Fetcher"

I turned the name around. Now it works as expected.

Status: Fixed » Closed (fixed)

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