Project

General

Profile

Actions

Patch #31334

closed

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

Added by Jens Krämer almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Wiki
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This is a corner case, but it happened recently with a client here at Planio.

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.


Files

Actions

Also available in: Atom PDF