Hi everyone,
Bret and I are working on an installation plagued by the old story
corruption problem, running 1.10.7 with David's patch from this thread:
http://www.gossamer-threads.com/lists/bricolage/devel/36279
We've come up with a set of steps to consistently reproduce the funny
version numbers. The root problem seems to be a difference between
checking in a story from the desk/workspace and checking it in from
the story profile (Callback/Desk.mc vs Callback/Profile/Story.mc).
Here are the steps:
0. Create a new story, check it into a desk.
- story_instance gets version = 1, checked_out = f
1. Check out the story from the desk.
- story_instance gets version = 1, checked_out = t
2. Return to the desk, use the "Check in" link
- story_instance gets version = 2, checked_out = f
3. Check out the story again.
- story_instance gets version = 2, checked_out = t
...but the story profile screen still says "Current Version: 1". Other
users will see "Current Version: 2" so I think this is a session/
caching problem
4. Return to the desk, use the "Check in" link
- story_instance gets version = 3, checked_out = f
5. Check out the story again.
- story_instance gets version = 3, checked_out = t
...again, the story profile says "Current Version: 1".
6. This time, use the "Check in" button at the bottom of the story
profile screen.
- The desk now says the story is at version 2
- story_instance still has the "version = 3, checked_out = t" record
At this point, the log shows the version number going from 2 to 3 to 2
again. If you check out the story and check in from the story profile,
you'll get an SQL complaint on udx_story__story_instance because it's
trying to create version 3, which already exists.
Callback::Profile::Story->checkin() calls a clear_my_state() method,
while Callback::Desk->checkin() doesn't have anything like that. Does
this have anything to do with it? Or is it some other difference
between the two checkin() methods?
Bret and I are working on an installation plagued by the old story
corruption problem, running 1.10.7 with David's patch from this thread:
http://www.gossamer-threads.com/lists/bricolage/devel/36279
We've come up with a set of steps to consistently reproduce the funny
version numbers. The root problem seems to be a difference between
checking in a story from the desk/workspace and checking it in from
the story profile (Callback/Desk.mc vs Callback/Profile/Story.mc).
Here are the steps:
0. Create a new story, check it into a desk.
- story_instance gets version = 1, checked_out = f
1. Check out the story from the desk.
- story_instance gets version = 1, checked_out = t
2. Return to the desk, use the "Check in" link
- story_instance gets version = 2, checked_out = f
3. Check out the story again.
- story_instance gets version = 2, checked_out = t
...but the story profile screen still says "Current Version: 1". Other
users will see "Current Version: 2" so I think this is a session/
caching problem
4. Return to the desk, use the "Check in" link
- story_instance gets version = 3, checked_out = f
5. Check out the story again.
- story_instance gets version = 3, checked_out = t
...again, the story profile says "Current Version: 1".
6. This time, use the "Check in" button at the bottom of the story
profile screen.
- The desk now says the story is at version 2
- story_instance still has the "version = 3, checked_out = t" record
At this point, the log shows the version number going from 2 to 3 to 2
again. If you check out the story and check in from the story profile,
you'll get an SQL complaint on udx_story__story_instance because it's
trying to create version 3, which already exists.
Callback::Profile::Story->checkin() calls a clear_my_state() method,
while Callback::Desk->checkin() doesn't have anything like that. Does
this have anything to do with it? Or is it some other difference
between the two checkin() methods?