Failed Stale Template Cache Delete Errorâ¦Analyzedâ¦But No Answer
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
For some of the extremely static content on my site, I use caching to prevent multiple db queries during every single load. I also have multiple locale on my site with custom cache key names. The actual execution of cache is running perfectly at the moment on all the locales.
However, when I make changes to any entry which has cache enabled, I get stale template delete failed error. When I take look at the actual MySQL table, I see that the requisite cache row is deleted from the table upon making changes to an entry. So I don't quite understand why this error shows up.
Here is a typical cache directive I used in my templates
% cache globally using key "www-features" for 24 hours %
When I look at the runtime logs, I see following error which I am assuming it to be associated with this problem
2018/11/03 19:10:42 [error] [application] Encountered an error running task 17 (DeleteStaleTemplateCaches), step 13 of 29: An exception was thrown:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'dateCreated' in order clause is ambiguous.
The SQL statement executed was:
SELECTelements
.id
,entries
.sectionId
,entries
.typeId
,entries
.authorId
,entries
.postDate
,entries
.expiryDate
FROMcraft_elements
elements
JOINcraft_elements_i18n
elements_i18n
ON elements_i18n.elementId = elements.id
JOINcraft_content
content
ON content.elementId = elements.id
JOINcraft_entries
entries
ON entries.id = elements.id
JOINcraft_sections
sections
ON sections.id = entries.sectionId
LEFT JOINcraft_structures
structures
ON structures.id = sections.structureId
LEFT JOINcraft_structureelements
structureelements
ON (structureelements.structureId = structures.id) AND (structureelements.elementId = entries.id)
WHERE ((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements_i18n.enabled = 1)) AND (sections
.handle
IN ('policies'))
GROUP BYelements
.id
ORDER BYdateCreated
. Bound with :locale='en_us'
Looks like you have dateCreated
field in multiple tables used in the join and the statement is not explicitly defining the identity of the table ???
Can anyone help me to fix this?
templating cache craft2
add a comment |Â
up vote
1
down vote
favorite
For some of the extremely static content on my site, I use caching to prevent multiple db queries during every single load. I also have multiple locale on my site with custom cache key names. The actual execution of cache is running perfectly at the moment on all the locales.
However, when I make changes to any entry which has cache enabled, I get stale template delete failed error. When I take look at the actual MySQL table, I see that the requisite cache row is deleted from the table upon making changes to an entry. So I don't quite understand why this error shows up.
Here is a typical cache directive I used in my templates
% cache globally using key "www-features" for 24 hours %
When I look at the runtime logs, I see following error which I am assuming it to be associated with this problem
2018/11/03 19:10:42 [error] [application] Encountered an error running task 17 (DeleteStaleTemplateCaches), step 13 of 29: An exception was thrown:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'dateCreated' in order clause is ambiguous.
The SQL statement executed was:
SELECTelements
.id
,entries
.sectionId
,entries
.typeId
,entries
.authorId
,entries
.postDate
,entries
.expiryDate
FROMcraft_elements
elements
JOINcraft_elements_i18n
elements_i18n
ON elements_i18n.elementId = elements.id
JOINcraft_content
content
ON content.elementId = elements.id
JOINcraft_entries
entries
ON entries.id = elements.id
JOINcraft_sections
sections
ON sections.id = entries.sectionId
LEFT JOINcraft_structures
structures
ON structures.id = sections.structureId
LEFT JOINcraft_structureelements
structureelements
ON (structureelements.structureId = structures.id) AND (structureelements.elementId = entries.id)
WHERE ((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements_i18n.enabled = 1)) AND (sections
.handle
IN ('policies'))
GROUP BYelements
.id
ORDER BYdateCreated
. Bound with :locale='en_us'
Looks like you have dateCreated
field in multiple tables used in the join and the statement is not explicitly defining the identity of the table ???
Can anyone help me to fix this?
templating cache craft2
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
For some of the extremely static content on my site, I use caching to prevent multiple db queries during every single load. I also have multiple locale on my site with custom cache key names. The actual execution of cache is running perfectly at the moment on all the locales.
However, when I make changes to any entry which has cache enabled, I get stale template delete failed error. When I take look at the actual MySQL table, I see that the requisite cache row is deleted from the table upon making changes to an entry. So I don't quite understand why this error shows up.
Here is a typical cache directive I used in my templates
% cache globally using key "www-features" for 24 hours %
When I look at the runtime logs, I see following error which I am assuming it to be associated with this problem
2018/11/03 19:10:42 [error] [application] Encountered an error running task 17 (DeleteStaleTemplateCaches), step 13 of 29: An exception was thrown:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'dateCreated' in order clause is ambiguous.
The SQL statement executed was:
SELECTelements
.id
,entries
.sectionId
,entries
.typeId
,entries
.authorId
,entries
.postDate
,entries
.expiryDate
FROMcraft_elements
elements
JOINcraft_elements_i18n
elements_i18n
ON elements_i18n.elementId = elements.id
JOINcraft_content
content
ON content.elementId = elements.id
JOINcraft_entries
entries
ON entries.id = elements.id
JOINcraft_sections
sections
ON sections.id = entries.sectionId
LEFT JOINcraft_structures
structures
ON structures.id = sections.structureId
LEFT JOINcraft_structureelements
structureelements
ON (structureelements.structureId = structures.id) AND (structureelements.elementId = entries.id)
WHERE ((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements_i18n.enabled = 1)) AND (sections
.handle
IN ('policies'))
GROUP BYelements
.id
ORDER BYdateCreated
. Bound with :locale='en_us'
Looks like you have dateCreated
field in multiple tables used in the join and the statement is not explicitly defining the identity of the table ???
Can anyone help me to fix this?
templating cache craft2
For some of the extremely static content on my site, I use caching to prevent multiple db queries during every single load. I also have multiple locale on my site with custom cache key names. The actual execution of cache is running perfectly at the moment on all the locales.
However, when I make changes to any entry which has cache enabled, I get stale template delete failed error. When I take look at the actual MySQL table, I see that the requisite cache row is deleted from the table upon making changes to an entry. So I don't quite understand why this error shows up.
Here is a typical cache directive I used in my templates
% cache globally using key "www-features" for 24 hours %
When I look at the runtime logs, I see following error which I am assuming it to be associated with this problem
2018/11/03 19:10:42 [error] [application] Encountered an error running task 17 (DeleteStaleTemplateCaches), step 13 of 29: An exception was thrown:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'dateCreated' in order clause is ambiguous.
The SQL statement executed was:
SELECTelements
.id
,entries
.sectionId
,entries
.typeId
,entries
.authorId
,entries
.postDate
,entries
.expiryDate
FROMcraft_elements
elements
JOINcraft_elements_i18n
elements_i18n
ON elements_i18n.elementId = elements.id
JOINcraft_content
content
ON content.elementId = elements.id
JOINcraft_entries
entries
ON entries.id = elements.id
JOINcraft_sections
sections
ON sections.id = entries.sectionId
LEFT JOINcraft_structures
structures
ON structures.id = sections.structureId
LEFT JOINcraft_structureelements
structureelements
ON (structureelements.structureId = structures.id) AND (structureelements.elementId = entries.id)
WHERE ((((elements_i18n.locale = :locale) AND (content.locale = :locale)) AND (elements.archived = 0)) AND (elements_i18n.enabled = 1)) AND (sections
.handle
IN ('policies'))
GROUP BYelements
.id
ORDER BYdateCreated
. Bound with :locale='en_us'
Looks like you have dateCreated
field in multiple tables used in the join and the statement is not explicitly defining the identity of the table ???
Can anyone help me to fix this?
templating cache craft2
templating cache craft2
edited 10 mins ago
Lindsey Dâ¦
20.3k43688
20.3k43688
asked 5 hours ago
hvs
956
956
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
OK, I found the answer to this. Here is the correct answer.
Basically change dateCreated
to elements.dateCreated
in my template.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
OK, I found the answer to this. Here is the correct answer.
Basically change dateCreated
to elements.dateCreated
in my template.
add a comment |Â
up vote
2
down vote
OK, I found the answer to this. Here is the correct answer.
Basically change dateCreated
to elements.dateCreated
in my template.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
OK, I found the answer to this. Here is the correct answer.
Basically change dateCreated
to elements.dateCreated
in my template.
OK, I found the answer to this. Here is the correct answer.
Basically change dateCreated
to elements.dateCreated
in my template.
answered 5 hours ago
hvs
956
956
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcraftcms.stackexchange.com%2fquestions%2f28307%2ffailed-stale-template-cache-delete-error-analyzed-but-no-answer%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password