Help:编辑冲突
注意:當您編輯本頁面時,即同意以CC0協議授權您的貢獻。您可以在公有領域帮助页面找到更多信息。 |
多位使用者同時嘗試編輯頁面的同一部分時,MediaWiki中會發生编辑冲突。
如果一位使用者儲存了自己的變更,那麼之後另一位仍編輯中的使用者試圖儲存自己的變更時,由於第二位使用者開始編輯時的基礎內容已變更,MediaWiki可以發現衝突。 然後,系統會要求第二位使用者手動解決衝突,將他們的變更合併在頁面的最新版本。 這樣可以防止無意間覆寫並確保考慮到所有貢獻。
如果儲存時系統緩慢,你可能在前次編輯處理時再次編輯,導致與自己編輯衝突。 衝突頁面可能會顯示過時版本,如果從其中儲存,你之前的編輯可能會丟失。 作出更多變更前等待第一筆儲存完畢即可避免上述情況。
Understanding the edit conflict page layout
When there's an edit conflict in MediaWiki, the page title is automatically changed to the below:
编辑冲突:Page Title
Where "Page Title" is the title of the page you are editing.
Then above the edit box, the below notification message is displayed.
其他用户在您开始编辑后更改了该页面。下方第一个文本区含有该页面当前的文本,第二个文本区显示您的更改。您需要把自己的更改合并至现有文本。在您点击“$1”后,只会发布第一个文本区中的文本。
The upper text area refers to the edit box of your current edit.
The lower text area refers to the difference between your current edit and the stored revision. This is displayed at the bottom of the edit conflict page. See the image sample below:
How to resolve an edit conflict
Scenario 1: Small changes vs. large changes
If User 1's changes are minor while User 2's changes are significant, User 1 should work from User 2's version:
- Re-merge user 1's changes - Manually re-apply User 1's small changes to User 2's version.
- Edit summary - Include "via edit conflict, will remerge" in the edit summary to indicate that an edit conflict was resolved.
- Notify via Talk Page - Use Template:Edit conflict on the Discussion/Talk page to inform User 2 and others about the conflict resolution, allowing User 2 to review the merged changes for accuracy.
Scenario 2: Large changes vs. small changes
If User 1 made significant edits and User 2 made only minor adjustments:
- Work from user 1's version - Start with User 1's version of the text.
- Incorporate user 2's edits - Copy the relevant section(s) from User 2's version into User 1's. If User 1 was section editing, only copy the affected section.
- Edit summary - Use a summary like "via edit conflict, will remerge".
- Apply user 2's changes - After saving, review the page history, identify User 2's edits, and re-apply them in a subsequent edit.
Scenario 3: Both users make large changes
When both users have made significant changes:
- Submit user 1's version - User 1 may submit their version first.
- Collaborate - Both users should review both versions and collaborate to merge their changes. This may involve discussion to determine the best approach.
General best practices
- Avoid overwriting - Never simply overwrite another user's changes. Always assume good faith and use the conflict resolution tools effectively.
- Use the diff tool - After merging, double-check the changes by comparing versions with the diff feature to ensure nothing important is lost.
- Respect the process - Ignoring edit conflicts is not acceptable. Proper resolution ensures that all contributors' efforts are respected and integrated.
By following these guidelines, contributors can effectively manage edit conflicts and ensure that collaborative editing remains smooth and productive.
Handling logical edit conflicts
Logical edit conflicts occur when multiple editors make changes to a page simultaneously, but the conflict isn't detected by MediaWiki's standard edit conflict system.
This typically happens when an editor copies the entire source text into a local text editor, makes extensive modifications, and then pastes the updated content back into the wiki.
If another editor has made changes during this time, those changes might be unintentionally overwritten.
To avoid logical edit conflicts, follow these best practices:
- Edit in the original edit box - After copying the source text, ensure that you paste your updated content back into the same edit box from which it was originally copied. This reduces the risk of losing other editors' changes that might have occurred while you were editing.
- Check for recent changes - Before pasting your modifications back onto the page, always check the page history for any edits made since you started. If there are changes, review and merge them into your content to avoid overwriting someone else's contributions.
By following these steps, editors can help maintain the integrity of collaborative editing on the wiki and minimize the risk of undetected edit conflicts.
Reverting to a previous version
When you revert a page to an earlier version in MediaWiki, there's a risk of accidentally removing newer edits. This happens because the edit conflict detection system may not warn you about conflicts when reverting, so changes made after the version you are reverting to might be lost.
How to revert safely
- Copy and paste - Instead of directly reverting, copy the content from the older version and paste it into the latest version. This way, you can keep any recent changes.
- Check differences (Diff) - After reverting, always check the difference (diff) between your version and the latest one to make sure you haven't removed any recent edits.
- Avoid reversion wars - Reverting back and forth can lead to conflicts with other editors. It's better to discuss changes and reach an agreement.
Following these steps will help you avoid accidentally undoing someone else's work.
Preventing edit conflicts
To minimize edit conflicts and streamline your editing process, focus on these core strategies:
- Edit less frequently modified pages - Try to focus on pages that haven't been edited recently. This reduces the likelihood of encountering other users making edits simultaneously.
- Make larger, consolidated edits - Combine your changes into a single, comprehensive edit rather than making multiple small changes. This reduces the likelihood of causing edit conflicts for others. Use the "Show preview" button to review your changes before saving.
- Use an "In Use" notice - If you are making significant edits to a page, place a Template:Inuse at the top to signal to others that the page is being actively edited. Remove the template once your edits are complete.
- Automatic edit conflict merging - MediaWiki's will automatically merge edits that touch unrelated parts of a page, and will only trigger an edit conflict if multiple users attempt to edit the same lines.