A bug was reported where editing the first post of a topic with a long title triggered a PG::StringDataRightTruncation error due to URL length exceeding 500 characters during link generation. chrispanag identified that the issue stemmed from the topic title’s length causing the generated backward link (from quoted post to original) to exceed the database column limit. sam initially suspected URL length but could not reproduce it with the provided URL, later hypothesizing it might relate to the post being the first in the topic. chrispanag confirmed the issue was tied to the topic title length, noting that editing the title triggered the 500 error, though the title sometimes still saved. Further investigation chrispanag revealed the failure occurred during updating the linked post’s backward link. sam assigned the fix to Osama for core improvement with more forgiving truncation. chrispanag followed up later, reporting a second occurrence. The bug was eventually resolved by andrei via pull request #13134, which addressed the backward link generation issue for long titles. chrispanag thanked the team for the fix.
It has to do with the topic’s title. When I edited the topic’s title to something shorter, the errors stopped. When I try to restore it to its original length, it showed me a 500 error while updating the title. After the 500 error, I refreshed and the title was updated.
This happens on the update of the “linked” post (the one that is quoted) to include a link to the quotation. The link (because of the long title) ends up to be over 500 chars long, which triggers this issue.
The actual link on the linked post, never gets updated if the title is very long.