I had topic excerpts working as desired — that is, they observed post_excerpt_maxlength in all cases. I first did this with a plugin (which worked), then learned about SiteSetting.always_include_topic_excerpts = true, so switched to that. Still worked.
About two days ago, perhaps after applying 2.4.0.beta4, excerpts started truncating at 50 characters. Very mysterious.
I’ve tried flipping SiteSetting.always_include_topic_excerpts and reinstalling the plugin, and changing the value of post_excerpt_maxlength, but no change. Still stuck at 50 characters.
Another point is that it’s affecting only new topics. Older topics with longer excerpts still have them.
Adding a post to such a topic doesn’t shorten the excerpt (unsurprising), but editing the first post does cause the excerpt to newly truncate at 50 chars.
So while I haven’t looked (Discourse noob), it seems that excerpts are a database field, and the truncation only happens on a record update.
That plugin hasn’t been updated for almost two years now and it predates the addition of the always_include_topic_excerpts setting. You should not be using it at all. I’ve added a deprecation notice and will delete that repository in a week or so.
Please remove that outdated plugin, enable the always_include_topic_excerpts setting and report back if you still have the same problem.
This seems to work. I had been thrown off because applying the plugin got me the (300 char) excerpts I wanted, where before I had none. I suppose that only subsequently-created topics exhibited the hard-coded 50.
One wrinkle: Existing topics with 50 char excerpts still have them. It seems necessary to touch the OP of these topics to lengthen their excerpts to post_excerpt_maxlength. Any way to automate that? Thanks.
Because the first rake task completed without issue but didn’t regenerate the excerpts. Nevertheless, site was running.
Then tried with be. This exited with:
rake aborted!
PG::ConnectionBad: FATAL: Peer authentication failed for user "discourse"
… followed by a stack trace. Now, topic pages are unreachable. Home page is reachable, and most of admin is reachable — though charts on admin home fail to load. Running …
rake posts:rebake
… doesn’t fix things. Eventually rebooted the droplet, but the condition persists. Any help appreciated.