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

Error on "Deleting stale template caches" #4141

Open
andrewfairlie opened this Issue Apr 14, 2019 · 5 comments

Comments

Projects
None yet
2 participants
@andrewfairlie
Copy link

andrewfairlie commented Apr 14, 2019

Description

"Deleting stale template caches" fails, the log file reports...

The SQL being executed was: SELECT "elements"."id", "id"
FROM (SELECT "elements"."id" AS "elementsId", "elements_sites"."id" AS "elementsSitesId", "content"."id" AS "contentId"
FROM "craft_elements" "elements"
INNER JOIN "craft_neoblocks" "neoblocks" ON "neoblocks"."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"
INNER JOIN "craft_structureelements" "structureelements" ON ("structureelements"."elementId" = "elements"."id") AND ("structureelements"."structureId"=1320)
WHERE ("neoblocks"."fieldId"=9) AND ("neoblocks"."ownerId"=1315) AND ("elements_sites"."siteId"=1) AND ("content"."siteId"=1) AND ("elements"."archived"=FALSE) AND ("elements"."dateDeleted" IS NULL) AND (("structureelements"."lft" > 2) AND ("structureelements"."rgt" < 3) AND ("structureelements"."root"=11273)) AND ("structureelements"."level" <= 2)
ORDER BY "structureelements"."lft", "elements"."dateCreated" DESC) "subquery"
INNER JOIN "craft_neoblocks" "neoblocks" ON "neoblocks"."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"
INNER JOIN "craft_structureelements" "structureelements" ON ("structureelements"."elementId" = "subquery"."elementsId") AND ("structureelements"."structureId"=1320)
ORDER BY "structureelements"."lft", "elements"."dateCreated" DESC
2019-04-14 10:11:22 [-][5][-][info][modules\mailchimpmodule\MailchimpModule::init] Mailchimp module loaded
2019-04-14 10:11:22 [-][5][-][info][steadfastcollective\md5twigfilter\Md5TwigFilter::init] MD5 Twig Filter plugin loaded
2019-04-14 10:11:22 [-][5][-][info][angellco\portal\Portal::init] Portal plugin loaded
2019-04-14 10:11:22 [-][5][-][info][nystudio107\seomatic\Seomatic::init] SEOmatic plugin loaded
2019-04-14 10:11:22 [-][5][-][info][nystudio107\twigpack\Twigpack::init] Twigpack plugin loaded
2019-04-14 10:11:22 [-][5][-][info][craft\queue\QueueLogBehavior::beforeExec]  [4533] Purging Cloudflare Cache (attempt: 1) - Started
2019-04-14 10:11:23 [-][5][-][info][craft\queue\QueueLogBehavior::afterExec]  [4533] Purging Cloudflare Cache (attempt: 1) - Done (time: 0.344s)
2019-04-14 10:11:23 [-][5][-][info][craft\queue\QueueLogBehavior::beforeExec]  [4534] Generating articles sitemap (attempt: 1) - Started
2019-04-14 10:11:23 [-][5][-][info][nystudio107\seomatic\services\{closure}] Meta container cache miss: actions/queue/run/1
2019-04-14 10:11:29 [-][5][-][info][craft\queue\QueueLogBehavior::afterExec]  [4534] Generating articles sitemap (attempt: 1) - Done (time: 6.528s)
2019-04-14 10:11:29 [-][5][-][info][craft\queue\QueueLogBehavior::beforeExec]  [4535] Deleting stale template caches (attempt: 1) - Started
2019-04-14 10:11:31 [-][5][-][error][craft\queue\QueueLogBehavior::afterError]  [4535] Deleting stale template caches (attempt: 1) - Error (time: 1.134s): SQLSTATE[42702]: Ambiguous column: 7 ERROR:  column reference "id" is ambiguous
LINE 1: SELECT "elements"."id", "id"

Steps to reproduce

  1. Save an entry
  2. Look at log file

Additional info

  • Craft version: 3.1.22
  • PHP version: 7.3.2
  • Database driver & version: PostgreSQL 11.2
  • Plugins & versions:

image

@brandonkelly

This comment has been minimized.

Copy link
Member

brandonkelly commented Apr 16, 2019

What was the actual error? You didn’t paste that part.

@andrewfairlie

This comment has been minimized.

Copy link
Author

andrewfairlie commented Apr 16, 2019

The error is that the "Deleting stale template caches" job fails on the sidebar. That and the excerpt of the log file in original comment is all I could find - is there anything else that would be useful?

@brandonkelly

This comment has been minimized.

Copy link
Member

brandonkelly commented Apr 16, 2019

The actual error will be listed right above the bit that you pasted from the logs. It should start with [error].

@andrewfairlie

This comment has been minimized.

Copy link
Author

andrewfairlie commented Apr 17, 2019

Sorry about that.

2019-04-13 15:09:33 [-][404][-][error][craft\queue\QueueLogBehavior::afterError]  [4420] Deleting stale template caches (attempt: 1) - Error (time: 0.345s): SQLSTATE[42702]: Ambiguous column: 7 ERROR:  column reference "id" is ambiguous
LINE 1: SELECT "elements"."id", "id"
                                ^
@brandonkelly

This comment has been minimized.

Copy link
Member

brandonkelly commented Apr 17, 2019

Thanks. Unfortunately I couldn’t tell you what is adding that extra id to the SELECT clause just from looking at the query or stack trace. Can you please send your composer.json and composer.lock files, plus a database backup, over to support@craftcms.com and reference this issue URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.