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

Selecting Entry Types in Channels Throws Error #5

Open
cap-akimrey opened this issue Oct 11, 2022 · 0 comments
Open

Selecting Entry Types in Channels Throws Error #5

cap-akimrey opened this issue Oct 11, 2022 · 0 comments

Comments

@cap-akimrey
Copy link

cap-akimrey commented Oct 11, 2022

Very useful plugin. I see maintenance is on hold, but I wonder if you have insight into this issue. It does not arise in localhost, but does on our UAT server. Have not tested on Production yet. Sorting works fine with Structure sections, but fails on Channel sections.

Screen Shot 2022-10-11 at 12 20 58 PM

Craft CMS v3.7.55.3
Sidebar Entry Types v1.0.3
PHP v7.4.28
MySQL v8.0.28

Error log:

2022-10-11 11:31:59 - error - yii\db\Exception
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lft' in 'order clause' in /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php:1302
Stack trace:
#0 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(1302): PDOStatement->execute()
#1 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT `element...')
#2 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll()
#4 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/db/Query.php(152): yii\db\Query->all(NULL)
#5 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1650): craft\db\Query->all(NULL)
#6 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(487): craft\elements\db\ElementQuery->all()
#7 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(102): craft\controllers\ElementIndexesController->elementQuery()
#8 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Controller.php(176): craft\controllers\ElementIndexesController->beforeAction(Object(yii\base\InlineAction))
#9 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('get-elements', Array)
#10 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction('element-indexes...', Array)
#11 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(602): craft\web\Application->runAction('element-indexes...', Array)
#12 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(272): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#13 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#14 /srv/app/uatcap2/htdocs/web/index.php(21): yii\base\Application->run()
#15 {main}

Next yii\db\Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lft' in 'order clause'
The SQL being executed was: SELECT `elements`.`id`, `elements`.`fieldLayoutId`, `elements`.`uid`, `elements`.`enabled`, `elements`.`archived`, `elements`.`dateCreated`, `elements`.`dateUpdated`, `elements_sites`.`id` AS `siteSettingsId`, `elements_sites`.`slug`, `elements_sites`.`siteId`, `elements_sites`.`uri`, `elements_sites`.`enabled` AS `enabledForSite`, `elements`.`canonicalId`, `elements`.`dateLastMerged`, `entries`.`sectionId`, `entries`.`typeId`, `entries`.`authorId`, `entries`.`postDate`, `entries`.`expiryDate`, `content`.`id` AS `contentId`, `content`.`title`, `content`.`field_accessLevel`, `content`.`field_additionalCss`, `content`.`field_altText`, `content`.`field_angularSearchAdditionsCss`, `content`.`field_angularSearchMainJs`, `content`.`field_angularSearchPolyfillsJs`, `content`.`field_angularSearchRuntimeJs`, `content`.`field_appleAppStoreUtm`, `content`.`field_apppage`, `content`.`field_article`, `content`.`field_batchId`, `content`.`field_bioFull`, `content`.`field_bioShort`, `content`.`field_body`, `content`.`field_borderOption`, `content`.`field_boxTheme`, `content`.`field_calloutTheme`, `content`.`field_capClosed`, `content`.`field_capExtension`, `content`.`field_capOffice`, `content`.`field_caption`, `content`.`field_cardBackgroundColor`, `content`.`field_cardCta`, `content`.`field_cardRowImageRatio`, `content`.`field_cardTheme`, `content`.`field_charge`, `content`.`field_city`, `content`.`field_competency`, `content`.`field_country`, `content`.`field_credentials`, `content`.`field_dateDisplay`, `content`.`field_daylightSavingsTime`, `content`.`field_deploymentScript`, `content`.`field_description`, `content`.`field_editorNotes`, `content`.`field_email`, `content`.`field_endDate`, `content`.`field_endTime`, `content`.`field_entriesListTitle`, `content`.`field_exhibiting`, `content`.`field_expandToFill`, `content`.`field_isFeatured`, `content`.`field_firstName`, `content`.`field_fontevaEventId`, `content`.`field_fontevaLink`, `content`.`field_formHtml`, `content`.`field_googlePlayStoreUtm`, `content`.`field_headerDescription`, `content`.`field_headerImageCaption`, `content`.`field_heading`, `content`.`field_helpLink`, `content`.`field_hideFromFeed`, `content`.`field_hideFromSitemap`, `content`.`field_homepageModuleTheme`, `content`.`field_hybridMeeting`, `content`.`field_imageLabel`, `content`.`field_includeToc`, `content`.`field_ipdAppPage`, `content`.`field_jobTitle`, `content`.`field_lastName`, `content`.`field_linkTarget`, `content`.`field_linkTargetAdvanced`, `content`.`field_listOnly`, `content`.`field_liveAgentInitParameter1`, `content`.`field_liveAgentInitParameter2`, `content`.`field_liveAgentInitParameter3`, `content`.`field_lmsActivityId`, `content`.`field_lmsActivityMaxCredit`, `content`.`field_localPage`, `content`.`field_location`, `content`.`field_locationCity`, `content`.`field_locationHotel`, `content`.`field_locationState`, `content`.`field_mainJs`, `content`.`field_maintenanceAlertEnabled`, `content`.`field_mediaId`, `content`.`field_meetingType`, `content`.`field_notificationMessage`, `content`.`field_metaData`, `content`.`field_middleName`, `content`.`field_moduleDescription`, `content`.`field_moduleFooter`, `content`.`field_moduleHeading`, `content`.`field_newCalendar`, `content`.`field_newTimeline`, `content`.`field_newWindow`, `content`.`field_newsmarketRss`, `content`.`field_notificationCustomTitle`, `content`.`field_pageHeading`, `content`.`field_pageSubheading`, `content`.`field_polyfillsJs`, `content`.`field_presenting`, `content`.`field_presetCallout`, `content`.`field_promotionalHeader`, `content`.`field_question`, `content`.`field_questionId`, `content`.`field_questionStem`, `content`.`field_quoteAttribution`, `content`.`field_quoteText`, `content`.`field_references`, `content`.`field_releaseDate`, `content`.`field_releaseNumber`, `content`.`field_responsiveOption`, `content`.`field_retirementDate`, `content`.`field_roundId`, `content`.`field_runtimeJs`, `content`.`field_scriptHtml`, `content`.`field_scriptId`, `content`.`field_showStaffContact`, `content`.`field_showEndTime`, `content`.`field_showStartTime`, `content`.`field_isSpecialReport`, `content`.`field_startDate`, `content`.`field_startTime`, `content`.`field_state`, `content`.`field_streamingService`, `content`.`field_subtitle`, `content`.`field_subTopic`, `content`.`field_summary`, `content`.`field_swiftypeModuleId`, `content`.`field_tabAnchor`, `content`.`field_tableHeaderOption`, `content`.`field_tableTheme`, `content`.`field_isTeamMemberAccess`, `content`.`field_template`, `content`.`field_timeZone`, `content`.`field_customUri`, `content`.`field_navUrl`, `content`.`field_version`, `content`.`field_virtualMeeting`, `elements`.`draftId`, `drafts`.`creatorId` AS `draftCreatorId`, `drafts`.`name` AS `draftName`, `drafts`.`notes` AS `draftNotes`, `drafts`.`provisional` AS `isProvisionalDraft`
FROM (SELECT `elements`.`id` AS `elementsId`, `elements_sites`.`id` AS `elementsSitesId`, `content`.`id` AS `contentId`
FROM `craft_elements` `elements`
INNER JOIN `craft_entries` `entries` ON `entries`.`id` = `elements`.`id`
INNER JOIN `craft_elements_sites` `elements_sites` ON `elements_sites`.`elementId` = `elements`.`id`
INNER JOIN `craft_content` `content` ON `content`.`elementId` = `elements`.`id`
LEFT JOIN `craft_drafts` `drafts` ON `drafts`.`id` = `elements`.`draftId`
WHERE (`entries`.`typeId`='40') AND (`entries`.`sectionId`='22') AND (`elements`.`id` IN (817, 819, 823, 825, 3569, 3134, 3571, 3572)) AND (`elements`.`archived`=FALSE) AND (`elements`.`dateDeleted` IS NULL) AND (`elements`.`canonicalId` IS NULL) AND ((`elements`.`draftId` IS NULL) OR (`drafts`.`provisional`=FALSE)) AND ((`elements`.`draftId` IS NULL) OR (NOT (`elements`.`canonicalId` IS NULL)) OR (`drafts`.`saved`=TRUE)) AND (`elements`.`revisionId` IS NULL)
ORDER BY `lft`) `subquery`
INNER JOIN `craft_entries` `entries` ON `entries`.`id` = `subquery`.`elementsId`
INNER JOIN `craft_elements` `elements` ON `elements`.`id` = `subquery`.`elementsId`
INNER JOIN `craft_elements_sites` `elements_sites` ON `elements_sites`.`id` = `subquery`.`elementsSitesId`
INNER JOIN `craft_content` `content` ON `content`.`id` = `subquery`.`contentId`
LEFT JOIN `craft_drafts` `drafts` ON `drafts`.`id` = `elements`.`draftId`
ORDER BY `lft` in /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Schema.php:676
Stack trace:
#0 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'SELECT `element...')
#1 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(1168): yii\db\Command->internalExecute('SELECT `element...')
#2 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Command.php(410): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/db/Query.php(249): yii\db\Command->queryAll()
#4 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/db/Query.php(152): yii\db\Query->all(NULL)
#5 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/elements/db/ElementQuery.php(1650): craft\db\Query->all(NULL)
#6 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(487): craft\elements\db\ElementQuery->all()
#7 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(102): craft\controllers\ElementIndexesController->elementQuery()
#8 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Controller.php(176): craft\controllers\ElementIndexesController->beforeAction(Object(yii\base\InlineAction))
#9 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('get-elements', Array)
#10 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(293): yii\base\Module->runAction('element-indexes...', Array)
#11 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(602): craft\web\Application->runAction('element-indexes...', Array)
#12 /srv/app/uatcap2/htdocs/vendor/craftcms/cms/src/web/Application.php(272): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#13 /srv/app/uatcap2/htdocs/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
#14 /srv/app/uatcap2/htdocs/web/index.php(21): yii\base\Application->run()
#15 {main}
Additional Information:
Array
(
    [0] => 42S22
    [1] => 1054
    [2] => Unknown column 'lft' in 'order clause'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant