I'm trying to use the module to import a json from a URL with an bearer token but I get this error:
Error: Call to a member function get() on null in Drupal\feeds_http_auth_fetcher\Feeds\Fetcher\HttpAuthFetcher->fetch() (line 43 of /var/www/html/web/modules/contrib/feeds_http_auth_fetcher/src/Feeds/Fetcher/HttpAuthFetcher.php)

#0 /var/www/html/web/modules/contrib/feeds/src/EventSubscriber/LazySubscriber.php(73): Drupal\feeds_http_auth_fetcher\Feeds\Fetcher\HttpAuthFetcher->fetch()
#1 [internal function]: Drupal\feeds\EventSubscriber\LazySubscriber->Drupal\feeds\EventSubscriber\{closure}()
#2 /var/www/html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#3 /var/www/html/web/modules/contrib/feeds/src/Event/EventDispatcherTrait.php(38): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#4 /var/www/html/web/modules/contrib/feeds/src/FeedsExecutable.php(224): Drupal\feeds\FeedsExecutable->dispatchEvent()
#5 /var/www/html/web/modules/contrib/feeds/src/FeedsExecutable.php(103): Drupal\feeds\FeedsExecutable->doFetch()
#6 /var/www/html/web/core/includes/batch.inc(295): Drupal\feeds\FeedsExecutable->processItem()
#7 /var/www/html/web/core/includes/batch.inc(137): _batch_process()
#8 /var/www/html/web/core/includes/batch.inc(93): _batch_do()

The line in the module is:

        $destination = 'temporary://';
        if ($this->configFactory->get('feeds.settings')->get('feeds_temporary_dir')) {
            $destination = 'public://';
            // Remove all files by mask before imported files as not needed any more.
            array_map('unlink', glob($this->fileSystem->realpath($destination) . "/feeds_http_fetcher*"));
        }

Where can I configure "feeds_temporary_dir"?

CommentFileSizeAuthor
#2 3380286-2.patch1.44 KBkeshavv

Comments

oskar_calvo created an issue. See original summary.

keshavv’s picture

Status: Active » Needs review
StatusFileSize
new1.44 KB

The error occurs because you haven't installed the feeds module https://www.drupal.org/project/feeds, The configuration of the feeds module is used, But there is no field to configure in feeds module as well. This condition is always false, So commented on it.
Created a patch for the quick fix.

yogeshmpawar’s picture

Status: Needs review » Closed (works as designed)