# 访问特定主题的修订时出现服务器错误

**URL:** https://meta.discourse.org/t/server-error-accessing-topic-revisions-on-a-specific-topic/339185
**Category:** Bug
**Tags:** rest-api
**Created:** [2024年十一月29日 01:48 UTC](https://meta.discourse.org/t/server-error-accessing-topic-revisions-on-a-specific-topic/339185 "2024-11-29T01:48:07Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2024年十一月30日 14:49 UTC](https://meta.discourse.org/t/server-error-accessing-topic-revisions-on-a-specific-topic/339185/12 "2024-11-30T14:49:16Z")

</div>

感谢 @paulofonseca.eth 的报告，此问题将通过以下方式修复：

> <https://github.com/discourse/discourse/pull/30014>
>
> When serializing the \`body\_changes\` in the \`PostRevisionSerializer\`, we create t…wo diffs: one for the \`cooked\` and another one for the \`raw\` version of the post.
> 
> Inside \`DiscourseDiff\`, we generate both \`html\` and \`markdown\` diffs when we only need the \`html\` diffs for the \`cooked\` version of the post and the \`markdown\` diff for the \`raw\` version of the post.
> 
> This solves the issue repored in https://meta.discourse.org/t/server-error-accessing-topic-revisions-on-a-specific-topic/339185 where some revisions would return 500 because of a \`ArgumentError : Attributes per element limit exceeded\` exception when trying to generate the \`html\` diff on a very large \`raw\`.

---

_[View the full topic](https://meta.discourse.org/t/server-error-accessing-topic-revisions-on-a-specific-topic/339185)._
