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

Trying to get property of non-object #754

Closed
cookie10codes opened this issue Oct 13, 2020 · 3 comments
Closed

Trying to get property of non-object #754

cookie10codes opened this issue Oct 13, 2020 · 3 comments
Labels

Comments

@cookie10codes
Copy link

Description

Getting this error when trying to run each feed-me in CLI. Looked it up and these doesn't have any assets set.

Steps to reproduce

1 docker-compose exec php ./craft feed-me/feeds/run 1 in CLI
2. error:

`Feed processing started for Feed ID feeds
PHP Notice 'yii\base\ErrorException' with message 'Trying to get property 'name' of non-object'

in /var/www/project/cms/vendor/craftcms/feed-me/src/queue/jobs/FeedImport.php:99

Stack trace:
#0 /var/www/project/cms/vendor/craftcms/feed-me/src/queue/jobs/FeedImport.php(99): yii\console\ErrorHandler->handleError()
#1 /var/www/project/cms/vendor/craftcms/cms/src/queue/BaseJob.php(51): craft\feedme\queue\jobs\FeedImport->defaultDescription()
#2 /var/www/project/cms/vendor/craftcms/cms/src/queue/Queue.php(169): craft\feedme\queue\jobs\FeedImport->getDescription()
#3 /var/www/project/cms/vendor/craftcms/feed-me/src/console/controllers/FeedsController.php(43): craft\queue\Queue->push()
#4 /var/www/project/cms/vendor/yiisoft/yii2/base/InlineAction.php(57): craft\feedme\console\controllers\FeedsController->actionRun()
#5 /var/www/project/cms/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/var/www/project/cms/vendor/yiisoft/yii2/base/InlineAction.php:57}()
#6 /var/www/project/cms/vendor/yiisoft/yii2/base/Controller.php(180): yii\base\InlineAction->runWithParams()
#7 /var/www/project/cms/vendor/yiisoft/yii2/console/Controller.php(179): craft\feedme\console\controllers\FeedsController->runAction()
#8 /var/www/project/cms/vendor/yiisoft/yii2/base/Module.php(528): craft\feedme\console\controllers\FeedsController->runAction()
#9 /var/www/project/cms/vendor/yiisoft/yii2/console/Application.php(180): craft\console\Application->runAction()
#10 /var/www/project/cms/vendor/craftcms/cms/src/console/Application.php(88): craft\console\Application->runAction()
#11 /var/www/project/cms/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction()
#12 /var/www/project/cms/vendor/yiisoft/yii2/base/Application.php(386): craft\console\Application->handleRequest()
#13 /var/www/project/cms/craft(22): craft\console\Application->run()
#14 {main}`

Additional info

  • Craft version: 3.5.12.1
  • Plugins & versions: 4.2.4
@cgooderham94
Copy link

I've also had similar issues. Have you tried updating asset indexes?

@cookie10codes
Copy link
Author

cookie10codes commented Oct 28, 2020

I found a way to go past this. If I check the help for the feeds

`php ./craft help feed-me/feeds/run

USAGE

craft feed-me/feeds/run [...options...]

OPTIONS
--appconfig: string
custom application configuration file path.
If not set, default application configuration is used.
--id: (defaults to 'feeds')
--limit
--offset`

I noticed the --id option. So from now on I use php ./craft feed-me/feeds/run --id=2 and this doesn't throw any error

@brandonkelly
Copy link
Member

brandonkelly commented Nov 7, 2020

We just released Feed Me 4.3.0 with a bit of a fix for this. We have removed the feed-me/feeds/run command entirely, with a new feed-me/feeds/queue command, which handles missing IDs better.

> php craft feed-me/feeds/queue
Error: Missing required arguments: feedId

Note that feed ID(s) should be specified directly after the .../queue now, rather than via an --id option. That seemed to make more sense considering that it’s not actually optional.

> php craft feed-me/feeds/queue 1,2,3

Note that the new queue command does not attempt to actually run the queue. You must run the queue/run command afterward to actually run the queue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants