PDA

View Full Version : Mystery of the Lost Document Changes


danson
04-03-2007, 11:44 AM
I lost about 5 hours work on Friday. I screamed.

And I've finally calmed down. Here is what happened - may be it is an UR problem may be not.

1. I opened a document I had stored within UR for editing.

2. I did several edits over the afternoon, saving very often (I know I did because I am self-programmed to hit CTRL+S every time I pause for thought)

3. When finished I did a final save and closed Word. Importantly word did NOT ask me "Do you want to exit without saving?" or some-such which means word did accept I had saved the document.

4. I then wanted to attach the doc to an email so dragged it from UR to my desktop.

5. Before attaching, I realised I wanted to change one more thing to I opened up the exported copy.

6. All my edits - from the time I first opened the document from UR - had disappeared.

7. Opening the document that was within UR also showed the original copy with none of my changes.

Any ideas what might have happened here? I'm very very nervous about editing documents from UR again incase this happens.

Perhaps UR would care to have an 'Save backup' option that saves a 'real filesystem' backup to a specified folder. It would certainly give me peace of mind.

Thanks,
Daniel

quant
04-03-2007, 01:03 PM
scary :(

when I finish to do some external edits, I save and before I close the application (word in your example), I have a look at UR and move to another item so that UR shows "Synchronizing item" ... if this would not happen, I know that there's sth wrong. Even if you close the word, there should still be a copy of that document in your Windows Temp directory.

danson
04-03-2007, 05:12 PM
Yeah I'll have to get into the habit of changing items to 'force' a synchronising of the saved item back in.

I looked everywhere on the computer and couldn't find it. I'm reasonably competant with windows (I own a IT company) and couldn't find it. Of course I still could have missed it but it was nowhere that I thought it was likely to be.

Would be nice if ms word had a decent proper autosave function for effective recoveries but that is for another forum!

Dan

quant
04-03-2007, 05:43 PM
when UR is not closed the copy of document is in your temp directory set in the system setting environment variable TEMP (just edit any document from inside UR and do save as to see where the current one is located). Anyway, it's too late for that now ...

quant
04-03-2007, 06:20 PM
Originally posted by danson
Would be nice if ms word had a decent proper autosave function for effective recoveries but that is for another forum!

Dan

Actually, Word has both autosave and also saving of backup copy, the problem is that the backup copy is created in the same location as the original document, and this directory is removed completely after UR is closed. Maybe UR should delete only the files that UR created, this would allow some recovery options ...

http://word.mvps.org/faqs/general/AutomaticSave.htm

danson
04-04-2007, 03:33 AM
Hi -

actually that document says you cannot do a 'real' autosave in word:

"You may have heard that Word can automatically save your document at specified intervals or create a backup copy for security. Do not believe this! "

They're mostly for recovery when word crashes and not a real periodic version backup system.

quant
04-04-2007, 05:32 AM
Originally posted by danson
actually that document says you cannot do a 'real' autosave in word:

"You may have heard that Word can automatically save your document at specified intervals or create a backup copy for security. Do not believe this! "

wau! When I wrote the comment I only looked at my Word options (which is not in English) and attached the page that google found. I read the document now properly, the option
"Save Autorecover info every X minutes" which doesnt do a real auto-save is translated to my language in Word

"Save automatically after X minutes" !!!

I can imagine some people relying on this and closing word before manually doing Save ...

Anyway, I dont use word that often, and use combination of ComponentSoftware RCS for document versions and differencing, VersionBackup for general file versions (like UR), and on top of that whole drive backup to an external one with SyncBack, ... all free programs for personal use

danson
04-04-2007, 10:48 AM
I think you're right about having to click on another data item to force the sync from the tmp directory -> UR.

It happened again today - I opened a Word Document from UR, saved it. Closed it and then dragged from UR to the desktop. The OLD file was exported (and almost sent to a customer).

It is necessary to click on another data item first to force the sync-back and then export the data.

This seem a little arcane - could UR be a bit more snappy in detecting that a document needs syncing? Perhaps keep polling all open documents to see if the modification date has changed (as it does when the file is saved over)?

kevina
04-06-2007, 05:11 PM
You don't need to navigate away from the item being externally edited, you can use File | Save (or the related File Toolbar button).

In addition you can Save all externally modified Info Items at once with Tools | Save All External Documents (on the menu).

danson
04-07-2007, 04:34 AM
Thanks - all that may work but it is a step in addition to the normal 'Save' process in the external application. Essentially we are required to do 2 save steps. One for Microsoft Word and then another within UR.

This will eventually lead to a mistake.

Would you agree it would be better to have something that polled the open files and, when they are updated (eg by looking at timestamps) they are automatically synced back into UR?

Best wishes,
Daniel

ianh
12-05-2007, 11:31 AM
Hi All,

I also lost a whole load of work yesterday. The experience was just as descibed here, except I've no idea what caused the failure to update from the word temp file. I closed word down Ok, with no save prompt, so word was up-to-date, then ... not sure.

Today I opened up UR and got yesterday morning's file back. I couldn't believe it. I've done loads of edits and saves today, checking all the time, and UR exits and so on and synch works fine each time.

Unlike the previous poster I didn't do anything with the file in UR after I edited it, I just went to bed. I'm pretty sure I exited UR and got no synch message, however I can only think maybe I must have left UR on then the PC went on standby or something - maybe the dreaded automatic upgrade.

Any clues where I went wrong? I think one thing that made me feel more secure was a mis-interpretation of the UR manual. In the section on editing external files it talks about the synch taking place when you do a Ctrl-S and I'd thought it was talking about the CTRL-S from inside the Word environment.

Silly me eh?

regards

Ian

kinook
12-05-2007, 01:32 PM
We're not aware of any way for UR to discard external changes made to a stored document (that doesn't mean it's impossible, but we have tested it quite a bit and verified that it works properly in our tests).

You don't actually have to do Ctrl+S in UR -- if not done already (due to auto-save, File | Save / Ctrl+S, or Tools | Save All External Documents), before the database is closed or UR is exited, it will sync all UR item(s) with any changes to temporary file(s) for the stored document(s).

One way you can verify that UR has updated its stored document from a modified external copy is, after saving in the external app, select the item in UR (if not already), do Ctrl+S (or File | Save), then File | Export and export as document to an empty folder, and open that file in the external app to verify the changes are there. If they're not, with UR still running and that item selected, choose Item | Open Containing Folder to open the folder with the temporary document being edited externally, and copy it somewhere and/or verify that it has the changes.

If you do find a scenario where UR doesn't update its stored copy of an externally modified document, please send as much detail as possible for us to reproduce the problem. Thanks.

ianh
12-09-2007, 04:31 PM
OK I think I know how to lose my editing.

I lost another 5 hours work today so I spent a few more minutes figuring out where I was going wrong.

Make a new word file with a few edits and import and move it into UR.

Open the word file with CTRL-J and edit it, every now and then save the file with CRTL-S in word, then for extra security go to UR and do item>synchronize. At the end of the afternoon, save one last time in word, and synchronize in UR, return to word, close the document, and exit. Go back to UR to check the file and voila - it was how you started out the day!

I have replicated this several times, but I'm still not totally clear what the sequence is. It seems that if you save in word and synch in UR it will work the first time, then after that it updates from the version it had after the first synch.

I thought maybe the issue is something to do with working on a file that is moved into UR but I just tried it on a file with a local copy and it does the same thing.

There seem to be a number of interacting factors, and it doesn't always seem to get caught out but I can get it to fail almost every time. I even just saw it exit from word with the save prompt, and still the synch process was not effective.

[PS - I just had another look at this. I see people above mention the Word temp directory, well as far as I can see when you open from UR, word makes its temp file in a UR temp directory. Maybe this has something to do with it.]

kinook
12-10-2007, 11:46 AM
We have identified one scenario that can result in the wrong sync behavior:
1) If the stored item's URL attribute still points to the originally imported document (it's best to move documents into UR if they'll be edited there so that no linkage is retained to the original imported document)
2) And the external application holds a lock while editing so that the temp edited file can't be opened for reading (Word does this)
3) Save works correctly, but when syncing, the first time, the stored document is correctly updated from the temp copy (by first copying to another temporary file since it can't be opened directly due to Word's lock), but the problem is that apparently from that point on in the same session, syncing updates UR's stored copy from the alternate temp copy (now out-of-date if additional changes are saved in Word) instead of from the Word-edited temp copy.

We are investigating the problem, but for now this situation can be avoided by either a) not syncing the stored document item (instead, use File | Save, Tools | Save All External Documents, or let UR save automatically), or b) clearing out the URL attribute of the stored document item (Ctrl+4, arrow down to URL attribute, Tab, Del, Enter) and restarting UR.

Quantum7
12-10-2007, 05:50 PM
One way to force UR to synchronize Word (or Excel) documents is to close the database.

I regularly leave UR open for 10-15 hours per day. At the end of the day 5-6 Excel sheets are updated sequentially when I close the database. Apparently those weren't synchronized automatically yet during other edits.

ianh
12-10-2007, 06:45 PM
I think you've identified the issue here. I was editing a stored copy of a file that still existed externally (as I thought this would be safer than moving them!) and the URL to the local copy was still present. Point 3 above seems to explain the behaviour I was victim of perfectly. It's not clear to me how file|save would work differently though, as I'd have thought this would also be interfered with by the lock on the word temp file, but I'll take your word for it. I clearly don't get the conceptual difference between synchronizing and saving.

I noticed the local copy is updated although Word was used to edit the stored copy retrieved from UR - is this what the URL to the local copy is used for, namely synchronizing to the local copy as well as the stored one?

[PS - could this also explain the problems janriff was having in his 11-16-2007 posting?]

I just tried to edit my document again. This time I did nothing except open the document, edit it, save the document in word and exit word. Nothing got saved in the UR database. My confidence in this is now at rock bottom.

kinook
12-11-2007, 08:42 AM
Originally posted by ianh
I think you've identified the issue here. I was editing a stored copy of a file that still existed externally (as I thought this would be safer than moving them!) and the URL to the local copy was still present. Point 3 above seems to explain the behaviour I was victim of perfectly.The main download has been updated with a patch for this issue (v3.2.6.3 in Help | About | Install Info afterwards).

It's not clear to me how file|save would work differently though, as I'd have thought this would also be interfered with by the lock on the word temp file, but I'll take your word for it. I clearly don't get the conceptual difference between synchronizing and saving.

I noticed the local copy is updated although Word was used to edit the stored copy retrieved from UR - is this what the URL to the local copy is used for, namely synchronizing to the local copy as well as the stored one?Editing a stored document that is also linked to the original external copy complicates sync a bit. The fix ensures that the temp edited copy is always favored over syncing with the other external copy.

[PS - could this also explain the problems janriff was having in his 11-16-2007 posting?]No, that did not involve external editing and was the result of two different copies of the same .urd file in different locations getting opened at different times.

I just tried to edit my document again. This time I did nothing except open the document, edit it, save the document in word and exit word. Nothing got saved in the UR database. My confidence in this is now at rock bottom. External document changes won't get saved in UR's stored copy until one of a) auto-save kicks in or File | Save is done (with selection still at that item), b) Tools | Save All External Documents is performed, c) the database is closed, or d) UR is exited.

ianh
12-12-2007, 10:20 AM
Thanks for your effort sorting this out. As far as I can see it works fine now.

One situation you can still lose some editing is if you have a doc opened externally in word, then exit UR with the document still open. In this case it seems UR will be updated only to the last time the document was saved in word. This seems pretty reasonable behaviour though.

When the doc is then closed in word it will still prompt to save the outstanding changes and go ahead with the save without any warnings, but I've no idea where the changes are saved to as neither the local copy or the UR copy subsequently seems to be fully up to date. I guess word just makes a new temp file, then deletes it when it exits. Or maybe writes it happily to the old UR temp file, but when UR opens again it discards it.