Lost project references in 024

Last night I was testing a suggestion to use Project References instead of web links. To try and understand, I created an ODT file, “todf.odt”, on my desktop. Then I created a project reference to it. I could click on the project reference and automatically launch LibreOffice to read the file. Great! Perfect.

Erased the link. Deleted the test file.

Created two project links to web pages that had previously been web pages in the binder. Moved the pages that were in the binder to the trash. I could get to the web pages through Firefox. Great! Perfect.

Created an ODT file that contained a table of data I wanted to persist. Created a project link to it. I could get to the ODT file through LibreOffice. Great! Perfect.

Just 'cuz I’m paranoid since the file save bug in 022, I made sure there was no asterisk in the title bar of the Scrivener window. There was not. Shut down for the night.


So I looked around. Nothing seemed amiss until I looked at the project’s .scriv (XML) file. There was a element to a file, but only one, and not to either of the web pages or to the ODT file that had the table in it. The element referred to the original “todf.odt” file that I had first created to test project links in general. It seems that nothing I had done after creating that project reference had actually been saved. As I said, I checked that the “project has been modified, but not saved” asterisk was not present before I shut down last night.

I have no confidence right now that I can save project references. I guess I’ll keep trying. But right now, it looks like there is some kind of bug around saving project references. Or perhaps the file save bug from 022 has not been completely fixed.

Here’s an idea: What if I’m wrong. What if, instead of…

  • Delete test link.
  • Delete file related to test link.
  • Create new links.

I actually did something like…

  • Delete file related to test link.
  • Create new links.
  • Delete test link.

Maybe that was the sequence of events? Could that have caused project save to screw up?

Neither sequence off-hand is causing my test projects to lose the project notes and I haven’t managed it otherwise, so unfortunately I can’t tell you whether doing it one way specifically caused the references to vanish. Thanks for the report; I’ll log it and continue seeing if I can reproduce it. Likewise if you happen to do it again, please do let me know.

I apologize for the obvious question, but you’ve double-checked that these were really all added to the Project References and not to Document References somewhere? Currently Scrivener’s not good about remembering what you were looking at in the inspector pane, so for instances it switches back to showing “Document Notes” when you close and reopen a project, and “Document References” will be the first thing you see if you switch to the references tab in the inspector, rather than project. I imagine you checked all this, but just because it does jump around like this (and that is on the list to fix), I wanted to be sure.

It’s still odd though that your .scrivx file would list the reference to the one document and yet not display it in the project, so it does sound like something quirky’s going on with your project. If you want to zip it up and send it to tech support, I’m happy to take a look at it, although I don’t know how much it would tell us.

I can confirm this bug.

To replicate this bug I dragged and dropped a reference from Windows Explorer. This deleted all my project references. I have hopefully restored them all from my (human) memory.

@StaceyUK: Thanks for trying to reproduce this! And thanks for the confirmation.

@MimeticMouton: I did check “Document Notes” and there was nothing present. And thanks for trying to reproduce the problem.

I just looked at the XML for that again. Here’s the relevant fragment:

                <BinderItem ID="8" Created="2011-05-18 05:49:39 +0000" Modified="2011-05-20 07:59:34 +0000" Type="Text">
                        <Target Type="Words">0</Target>
                        <Reference Destination="file:///C:/Users/MyWritingSelf/Desktop/todf.odt">testing 1,2,3</Reference>

As you can see, it’s in my “Characters” . The to “todf.odt” here is vestigial and a red herring. That’s left over from my creation of a link in the “Characters” file before I tried looking at Project Notes. It has nothing to do with the problem.

At least, I think it has nothing to do with the problem. The “todf.odt” file no longer exists.

Thanks to both of you for finding this. I still haven’t reproduced it, but I shall continue trying–obviously it’s a big bug! What version of Windows are you on, jravan? I doubt it makes a difference, but you never know. Did both of you drag from Explorer to get this?

Along with that, could you go through the steps, Stacey, of what you did? It sounds from your report that you already had some references there–were they in the project from previous sessions (meaning that they were saved at some point through closing and opening the project) and then got wiped this time? Also did they get deleted when you dragged in the new reference or were they present until you closed and reopened?

Regarding the XML snippet, that shows the “todf.odt” file as a document reference, not a project reference (which would be listed under ), so I gather that there aren’t Project References at all (which would be in line with not showing any when you open the project, as you’d expect)? The link will stay there until you delete it from the document references, whether or not the object it’s pointing to has been deleted. It shouldn’t have anything to do with the problem, but it’s good to know. (Also, Document Notes and Project Notes are unrelated to this. I mentioned Document Notes just because that’s the default view when you open the project, so you have to manually switch back to viewing Project References, no matter how you left the project.)

My steps.

  1. Project references already existed. Created using 022 or 023. Therefore been saved and project has been open and closed several times.
  2. References were wiped as soon as I completed drag and drop.
  3. First time I had used drag and drop for a reference. Usually use + sign drop down menu to add references.
  4. Interestingly, just tried the drag and drop method and the project references stayed this time. Could this be a remnant of the 022 saving bug?

Just an update on this, as I’ve found a couple cases to consistently reproduce this, or something similar. (At any rate, certainly a bug and I’ve added this to the info I’ve given Lee on your reports.) So far I haven’t gotten it to wipe previously added references, but I can add multiple references at once before the second part of the trigger and have them all get erased. Still not sure how to get the erasure Stacey saw.

So there are two cases in which I can get newly added references (to Project References or Document References) to disappear:

  1. Drag a reference into Document References

  2. Switch to Project References

  3. Switch back
    The newly added reference is gone. (This happens dragging to Project Refs and switching as well.) If multiple references are dragged into references (even one at a time, from different sources) in step one, they will all be erased.

  4. Drag a reference into Document or Project References

  5. Type in the document
    Newly added reference is gone. (As in the first instance, this happens for all newly dragged references.)

This only seems to happen with dragged links, and if a link is added via a different method after other links are dragged in step one but before step two, it prevents the links dragged in before it from being deleted.

So a couple questions, then: jravan, is it possible that after dragging in your references, you followed up with one of those step-2 triggers before closing the project, and just didn’t notice the deletion until you’re reopened the project? I still haven’t triggered the deletion with the actual close–e.g. dragging in and then closing hte project and reopening hasn’t yet caused the references to be deleted. So if it’s possible you might’ve done something else before closing the project and that was the trigger, that would help track this down.

Stacey, do you have any idea whether the reference you dragged in (in the case where it deleted everything) is linked to elsewhere in the document? There’s a Scrivener-link bug where you can’t have the link in both the document references and the document itself, and in that one the link will disappear a moment after it’s added to the references, no extra trigger required, but it only removes that single link, not any other ones, and so far that seems limited to document references and Scrivener links. But who knows, bugs are buggy, and maybe it’s a clue.

It’s not referenced exactly MM but the referenced document in question is compiled using the same project in which it is referenced if that makes sense. I haven’t lost any project refs since I filed my bug report.

knocks on wood

Forgive me for being dense (it’s that kind of day), but could you explain that again? I’d thought from your earlier post that you had dragged in a reference to an external document, via Windows Explorer, but is this referenced document–the one that, when you dragged it into the references, disappeared along with all the earlier ones–actually in your Scrivener project (ie, in the .scriv project folder) and visible in the binder? Was this just a Scrivener Link you were making, and I misunderstood, or is it a roundabout external reference to a file in your project (ie, you still went through Win Explorer to link to the specific .rtf file, so clicking the link would open it in an external editor vs. creating a Scrivener link so that clicking it opens the document normally as part of your project*)?

Thanks for clarification. I’m going to go down some chocolate to help clear my head. :slight_smile:

  • To whoever might get an idea from this: please don’t do that; it’s really not a good idea. :wink:

Compiled pdf and then drag and dropped through Win Explorer to make link. ie a normal project ref NOT a Scriv link.

Ahhh, got it. Thank you. Of course now your original explanation makes all kinds of sense. :slight_smile: