All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

Please read about the changes to BoldMinded add-on licensing.

Ticket: Exception when listing channel items in backend

Status Resolved
Add-on / Version Publisher 3.1.2
Severity
EE Version 5.3.0

Bruce Sabalaskey

Jan 20, 2020

When you go to the Edit | Channel (e.g. channel news or opinion, etc) menu to list the most recent articles of that channel, an exception is thrown. The page still displays in the backend. This is not an individual article but the “landing page” in the backend for a particular channel.
This channel is under Publisher control for draft management (but no translations), with a default save status for new / updated content is set to Draft.
‘$entryIds’ is not a countable entity.

PATH/system/user/addons/publisher/Service/Entry/Entry.php in BoldMinded\Publisher\Service\Entry\Entry::hasNewerDraft at line 711
            $language = $this->request->getCurrentLanguage();
        }
        $entryIds = $this->requestCache->get('entries_query_result_entry_ids');
        if (!$this->request->isAdminRequest() && !$entryId && count($entryIds) > 1) {
            return false;
        } else {
            return $this->hasDraftSingle($entryId, $language);
        }
    }
PATH/system/user/addons/publisher/mod.publisher.php in Publisher::appendDraftStatus at line 1275
PATH/system/user/addons/publisher/mod.publisher.php in Publisher::ajax_get_translation_status at line 1250
PATH/system/ee/legacy/libraries/Actions.php in EE_Actions::__construct at line 209
PATH/system/ee/legacy/libraries/Core.php in EE_Core::generate_action at line 527
PATH/system/ee/legacy/controllers/ee.php in EE::index at line 59
[internal] in call_user_func_array
PATH/system/ee/EllisLab/ExpressionEngine/Core/Core.php in EllisLab\ExpressionEngine\Core\Core::runController at line 241
PATH/system/ee/EllisLab/ExpressionEngine/Core/Core.php in EllisLab\ExpressionEngine\Core\Core::run at line 110
PATH/system/ee/EllisLab/ExpressionEngine/Boot/boot.php in require_once at line 151
/index.php at line 173
#1

BoldMinded (Brian)

Try changing that if line from

if (!$this->request->isAdminRequest() && !$entryId && count($entryIds) > 1) {

to

if (!$this->request->isAdminRequest() && !$entryId && $entryIds && count($entryIds) > 1) {
#2

Bruce Sabalaskey

That did the trick!

#3

BoldMinded (Brian)

https://www.dropbox.com/s/k2bogaobffkbg9z/SuccessKid.jpg?dl=0

Login to reply