- Issue created by @neubreed
- Status changed to Fixed
about 1 year ago 3:05pm 16 August 2023 - 🇳🇱Netherlands megachriz
This means that the feed you are trying to import data for is locked. A feed gets locked after an import starts. This is to prevent having two imports running for the same feed at the same time.
The fact that you get this error message means that an import for it was started earlier and that import did not finish (yet).
No import running? Try to unlock the feed
If you are sure that there's no import running currently, you can try to unlock the feed. On the feed page, there should be a tab called "Unlock". You can also go to "/feed/[feed id]/unlock" where "[feed id]" is the ID of the feed entity. For example: /feed/1/unlock. If you get an access denied, try to rebuild caches first.
- 🇦🇺Australia neubreed
Thanks for getting back to me. Unfortunately, the feed doesn't even start and doesn't become locked.
/feed/1/unlock presents an access denied page. (probably because no lock exists)
The function that catches the LockException doesn't display the error message that was thrown. Only the generic error 'The feed became locked before the import could begin'. It would be useful to at least see the exception message
protected function import(FeedInterface $feed) { try { $feed->lock(); } catch (LockException $e) { $this->messenger->addWarning($this->t('The feed became locked before the import could begin.')); return; } $feed->clearStates(); $this->createBatch($feed, static::FETCH) ->addOperation(static::FETCH) ->run(); }
Automatically closed - issue fixed for 2 weeks with no activity.