Closed rick-gnous closed 2 years ago
Actual error was reported in https://github.com/mantisbt-plugins/source-integration/pull/377#issuecomment-1029590273
APPLICATION ERROR #401
Database query failed. Error received from database was #-1: ERROR: value too long for type character varying(250) for the query: INSERT INTO mantis_plugin_Source_changeset_table ( repo_id, revision, parent, branch, user_id,
timestamp, author, message, info, ported, author_email, committer, committer_email, committer_id
) VALUES ( $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14 ).
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
I tried to use the sample output posted in https://github.com/mantisbt-plugins/source-integration/issues/386#issue-1123753149 to test the regex in #377, but the HTML seems strange (e.g. added newlines, <
entity, class name looks like Markdown link, double quotes instead of single) and does not match with the patterns in the code.
For the record, I used the following, manually modified versions for testing - I hope they're actually correct Cgit output.
<tr><th>author</th><td>Christian Hesse <mail@eworm.de></td><td class='right'>2021-05-18 22:49:13 +0200</td></tr>
<tr><th>author</th><td><span class='libravatar'><img class='inline' src='https://seccdn.libravatar.org/avatar/d39edb2018ca5544c1c390a8266096fb?s=13&d=retro'><img class='onhover' src='https://seccdn.libravatar.org/avatar/d39edb2018ca5544c1c390a8266096fb?s=128&d=retro'></span>Christian Hesse <mail@eworm.de></td><td class='right'>2021-05-18 22:49:13 +0200</td></tr>
Yes, I've used the "View Selection Source" of Firefox to extract HTML. Good to know that it's reformat the code.
Some instances of CGit have a plugin for avatar using libravatar. It adds a span in the author field and, because of his length, raises "value too long for type character varying(250)". Check the code below to see the difference. I use the official cgit repo for example.
Without libravatar
With libravatar