Jump to content

Ajuda:Conflicte d'edició

From mediawiki.org
This page is a translated version of the page Help:Edit conflict and the translation is 9% complete.

Els conflictes d'edició a MediaWiki es produeixen quan dos o més usuaris intenten editar la mateixa secció d'una pàgina simultàniament.

Si un usuari desa els seus canvis i un altre que encara estava editant intenta desar els seus, MediaWiki identifica un conflicte perquè el contingut subjacent ha canviat des que el segon usuari va començar a editar. Aleshores, el sistema requereix que el segon usuari resolgui manualment el conflicte fusionant els seus canvis amb la darrera versió de la pàgina. Això evita sobreescriptures involuntàries i garanteix que es tinguin en compte totes les contribucions.

Si el sistema és lent en desar, és possible que feu edicions addicionals abans que es processi la primera, cosa que provocarà un conflicte d'edició amb vosaltres mateixos. La pàgina de conflicte pot mostrar una versió obsoleta i, si deseu des d'allà, es podrien perdre les vostres edicions anteriors. Per evitar-ho, espereu que es completi el primer desament abans de fer més canvis.

Understanding the edit conflict page layout

When there's an edit conflict in MediaWiki, the page title is automatically changed to the below:

Conflicte d'edició: 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.

Algú altre ha canviat aquesta pàgina des que vas començar a editar-la. 
L'àrea de text superior conté el text de pàgina tal com existeix actualment.
Els canvis es mostren a l'àrea de text inferior.
Haureu de combinar els canvis en el text existent.
Només el text de l'àrea de text superior es publicarà quan premeu «$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:

  1. Re-merge user 1's changes - Manually re-apply User 1's small changes to User 2's version.
  2. Edit summary - Include "via edit conflict, will remerge" in the edit summary to indicate that an edit conflict was resolved.
  3. 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:

  1. Work from user 1's version - Start with User 1's version of the text.
  2. 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.
  3. Edit summary - Use a summary like "via edit conflict, will remerge".
  4. 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:

  1. Submit user 1's version - User 1 may submit their version first.
  2. 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

  1. Avoid overwriting - Never simply overwrite another user's changes. Always assume good faith and use the conflict resolution tools effectively.
  2. Use the diff tool - After merging, double-check the changes by comparing versions with the diff feature to ensure nothing important is lost.
  3. 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.

See also