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

Cron URl error #1

Open
mark-chief opened this issue Mar 15, 2019 · 1 comment
Open

Cron URl error #1

mark-chief opened this issue Mar 15, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mark-chief
Copy link

mark-chief commented Mar 15, 2019

HI,

When I hit the url https://www.domain.com/actions/publisher/api/publish I get the Internal Server error, Am i doing something wrong? I have an entry that is published already, with a new draft, see attachment and error below. Thanks!!

2019-03-15 12:48:33 [-][1][ro1c9ug2iffc7bnevqrov37741][error][TypeError] TypeError: Return value of goldinteractive\publisher\elements\EntryPublish::getEntry() must be an instance of craft\elements\Entry, null returned in /home/runcloud/webapps/projectname/craft/vendor/goldinteractive/craft3-publisher/src/elements/EntryPublish.php:163
Stack trace:
#0 /home/runcloud/webapps/projectname/craft/vendor/goldinteractive/craft3-publisher/src/services/Entries.php(57): goldinteractive\publisher\elements\EntryPublish->getEntry()
#1 /home/runcloud/webapps/projectname/craft/vendor/goldinteractive/craft3-publisher/src/controllers/ApiController.php(34): goldinteractive\publisher\services\Entries->publishDueEntries()
#2 [internal function]: goldinteractive\publisher\controllers\ApiController->actionPublish()
#3 /home/runcloud/webapps/projectname/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#4 /home/runcloud/webapps/projectname/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#5 /home/runcloud/webapps/projectname/craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('publish', Array)
#6 /home/runcloud/webapps/projectname/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('publish', Array)
#7 /home/runcloud/webapps/projectname/craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('publisher/api/p...', Array)
#8 /home/runcloud/webapps/projectname/craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('publisher/api/p...', Array)
#9 /home/runcloud/webapps/projectname/craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#10 /home/runcloud/webapps/projectname/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /home/runcloud/webapps/projectname/craft/public/index.php(21): yii\base\Application->run()
#12 {main}
2019-03-15 12:48:33 [-][1][ro1c9ug2iffc7bnevqrov37741][info][application] $_GET = [
    'p' => 'actions/publisher/api/publish'
]

Screen Shot 2019-03-15 at 13 00 33

@christianruhstaller
Copy link
Member

This shouldn't happen. I updated the function so that it can return null. That means this error should not happen anymore. But it will break some lines below because the entry is null, which it shouldn't be.

It would be interesting to see what is in the database for the publisher (entrypublishes) and if the entryId is null and if not if the ID does really exist as an entry.

@christianruhstaller christianruhstaller added the bug Something isn't working label Mar 18, 2019
@christianruhstaller christianruhstaller self-assigned this Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants