プロジェクト

全般

プロフィール

Vote #80037

完了

Do not lose content when updating a wiki page that has been renamed in the meantime

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
150
issue_org_id:
31334
author_id:
40856
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

This is a corner case, but it happened recently with a client here at "Planio":https://plan.io/redmine-hosting.

When somebody renames a wiki page while somebody else is editing it, the latter will lose any updates to the content upon save due to the redirect performed by the @find_existing_or_new_page@ before action.

This patch adds an integration test that reproduces the behavior, and fixes it by replacing the before action with a simple call to @@wiki.find_or_new_page(params[:id])@ in @update@.


journals

--------------------------------------------------------------------------------
Setting the target version to 3.4.11.
--------------------------------------------------------------------------------
I had to change the name of the class WikiTest in @test/integration/wiki_test.rb@ to run @bin/rails test@ because it conflicts with the class WikiTest in @test/unit/wiki_test.rb@. I encountered the following error.

<pre>
/path/to/redmine/test/unit/wiki_test.rb:22:in `<top (required)>': superclass mismatch for class WikiTest (TypeError)
</pre>

Do you think what class name is appropriate?
--------------------------------------------------------------------------------
Oh well :) What about WikiIntegrationTest?
--------------------------------------------------------------------------------
Jens Krämer wrote:
> Oh well :) What about WikiIntegrationTest?

Looks nice!
--------------------------------------------------------------------------------
Committed the patch. Thank you for reporting and fixing this issue.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン3.4.11_150 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0