00743: SectionEdit and simultaneous edit incompatibility

Summary: SectionEdit and simultaneous edit incompatibility
Created: 2006-05-21 10:21
Status: Open
Category: Cookbook
From: Ben
Assigned:
Priority: 4
Version: Version 2.1.4, 2.1.5 (2006-03-29)
OS:

Description: When two users edit sections on the same wiki page (using the default SectionEdit parameters), the simultaneous edit feature in PMWiki recognizes that the last one to save needs to view the entire page. However, when the last person saves their work, the entire contents of page are pasted into a section. Suppose the page looks like the following:


S1

S2

S3


User one edits !S1 and user two edits !S2. User 1 saves first and the page becomes (as desired)


S1

comments from user 1

S2

S3


Then user 2 saves their page and gets the warning that the page was modified. So the entire contents of the page come up, and since it all looks great user 2 clicks save. The page now looks like:


S1

comments from user 1

S2

S1

comments from user 1

S2

comments from user 2

S3

S3


Notice how the entire page was placed inside of section 2.

In addition, if user 2 did not place an enter after the last line of text that they wrote, then you get the following instead


S1

comments from user 1

S2

S1

comments from user 1

S2

comments from user 2!S3

S3


I am not sure which version of PHP I am running. If you think it is a PHP error, I will find out which version.

I love the script, it just becomes troublesome now to deal with simultaneous editing.