Having cleared all caches and leaving the site to its own devices, I've come back some hours later (after the scheduled cron task has run) to observe that Author submission is visible in Teasers where it has been deliberately hidden, and Teaser headings do not link to their respective nodes. This appears to only affect the default Page content type, not custom content types.

On examination of the HTML delivered to the browser, it's obvious that node.html.twig is being ignored in some cases. The *article* wrapper unique to that template is missing. The template conditional statement % if display_submitted % hasn't been parsed, revealing the authoring and post info etc.

Has anyone else observed this?

I've now set the internal page cache to *no caching* to see if it makes a difference.

CommentFileSizeAuthor
#13 teaser-error.jpg188.74 KBkrima
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

garryh created an issue. See original summary.

garryh’s picture

Issue summary: View changes
cilefen’s picture

Status: Needs review » Active
garryh’s picture

Additional info ...

I've now discovered that this affects some custom content types too.

Turning off the Internal Page cache did not stop this problem.

Clearing All Caches immediately corrects the problem, and all twig templates are again correctly read ... for a while.

garryh’s picture

Version: 8.3.x-dev » 8.4.x-dev

Even after upgrading core to 8.4.0, this is still an issue. There's little obvious logic to which nodes are effected, and there's only a handful at a time. My custom theme is a subtheme of Bartik (being a subtheme of Classy).

So to reiterate, if I clear all caches manually, all the faulty node teasers display correctly until the next cron run.

Why isn't the automated cron task doing the same thing, and refreshing ALL cached data? Is that "normal" for D8?

garryh’s picture

OK. I've circumvented this issue by duplicating node.html.twig and renaming the copy as node--teaser.html.twig so that there is also a specific child theme template for all teasers.

Weird.

garryh’s picture

My temporary "fix" to create specific teaser twig templates hasn't solved this problem.

The nodes that skip the node.html.twig template (or variants thereof e.g. node--page--teaser.html.twig) are usually the most recently created or edited content. This happens after an automated cron task.

When I clear all caches manually, all teasers in Views are correctly rendered again.

I'd be really grateful for any guidance or suggestions here, especially if there is a way to ensure that cron clears ALL caches every time.

garryh’s picture

Issue tags: +cron problem, +node templates
garryh’s picture

Status: Active » Needs review

For the record, in case this ever happens to anyone else, I found the culprit and have solved the problem. I did this by trawling through the database tables looking for similarities between affected nodes.

I discovered that for one of the Text Formats (Basic HTML), I had unwisely or accidentally disabled the filter "Correct faulty and chopped off HTML". After this was re-enabled and monitoring the site for some time, this issue of ignoring the relevant node template after cron hasn't recurred.

cilefen’s picture

Status: Needs review » Fixed

There is not a code change to review, so in cases like this we usually just mark it fixed.

garryh’s picture

Component: cache system » node system
Status: Fixed » Active
Issue tags: +CKEditor in core

Reopening this issue because I am again seeing this problem ...

I am now convinced this is related to the use (or not) of the CKEditor as a text editor.

Node teasers that bypass the template are apparently those that are using a Body/Summary text format that does NOT use the CKEditor, e.g. Restricted HTML or Plain text.

krima’s picture

Same problem with a subtheme of Bartik.

Every time I create a node, or I make some changes, the problem reoccurs. It also happens after one two days without making any changes.

This is quite annoying. I have to clear the cache and recreate it immediately from not logged in with another browser.

If I do nothing, after a few minutes or sometimes half an hour the problem reoccurs.

I think this happens when the pages with the teasers are visited by a spider before a browser.

krima’s picture

FileSize
188.74 KB

I add an image that shows the problem.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

krima’s picture

Problem solved. The RSS view was set to teaser instead of RSS. Set correctly, the problem is no longer presented.