Menu

#164 Old files reappear

workingwiki
open
5
2013-05-07
2012-02-14
Lee Worden
No

Occasionally I end up seeing a latex document as it was a week ago, as if I hadn't edited it a bunch since then. Why? It's disturbing. It happened to me just now, so I was able to go and look at the debug output, and verified that WW is syncing the current version of the .tex into PE with the make request, and PE is asking make to update the .xhtml file, and make thinks the file doesn't need to be remade. But I'm sure I saw more recent versions of the .xhtml before.

Update: now I did a clear working directory and reloaded the page, and now it's giving me the up-to-date version of the output.

Discussion

  • Lee Worden

    Lee Worden - 2012-02-14

    I just checked whether looking at an old version of the page could cause the old version of the .tex to get synced in there in some mixed-up way, but I just saw the current version of the output file on the old page, and it's still up to date on the current page when I reload it.

     
  • Lee Worden

    Lee Worden - 2012-02-14

    I'm having trouble imagining what could cause this. But whatever it is, I guess it's conceivable that it might also be implicated in the "ghost .mk files": https://sourceforge.net/tracker/index.php?func=detail&aid=3473560&group_id=366300&atid=1527385

     
  • Lee Worden

    Lee Worden - 2012-02-16

    And now the same page, http://lalashan.mcmaster.ca/theobio/worden/index.php/Laplacian_Paper, has gone back to showing an old version of the paper again! I swear I didn't do anything to it! So I did "sync all source files" and reloaded the page, and it seems to be back to the current version now.

    I'm very puzzled, because where does the old content come from? Once the new .xhtml is made in the working directory, we know that the .tex, the .xml, and the .xhtml are updated. The only places the old .tex file might be, as far as I can think of, are in the wiki's stored revisions of the page, and in preview and background sessions. The only way to merge files from a preview session is to save your edits, and even then it only merges if nothing has been done in the persistent directory since the preview session was created. This ought to rule out making a newer version and then merging in an older one. As for background jobs, I'm quite sure I haven't done any in the Laplacian_Paper project - why would I? - and that project isn't a prerequisite of any others and doesn't have prerequisites (yet). So does that mean it must be WW retrieving the old page text from the page's history and syncing it into the directory somehow?

     
  • Jonathan Dushoff

    This sounds like the same problem I was having in the Refs project. It was very hard to track, and very persistent. I think I eventually "solved" it by changing the name of the offending file. That project was so weird and hack-y that I didn't worry about the cause too much, but this sounds like a different case.

     
  • Lee Worden

    Lee Worden - 2012-02-16

    Yes, it definitely sounds like the same bug. If it keeps happening to my paper, maybe I can gather enough clues to track it down.

     
  • Lee Worden

    Lee Worden - 2012-02-20

    There's a line in WWStorage::cache_page_from_submission() that assumes that whenever the wiki is parsing something that's not loaded from the DB, it's new text being previewed. In that case, it sets the modification time of any source files in the wiki text to now. This could cause confusion in the working directory if parsing an old revision: if it puts today's date on an old copy of the file and makes the .xhtml, then it would fail to remake later when it puts the current revision in there with the date it was saved.

     
  • Lee Worden

    Lee Worden - 2012-02-20

    There is strange behavior along these lines in the diff page, at least sometimes. Look at this:
    http://lalashan.mcmaster.ca/theobio/worden/index.php?title=Laplacian_Paper&diff=1429&oldid=1428 -
    it compares the current (as of today) to the previous version of the paper, and displays a version a week or two older than either of them! Why? If this behavior is reproducible enough, I may be able to use it to find out where that old data's coming from.

     
  • Lee Worden

    Lee Worden - 2012-12-01

    I saw this now on http://lalashan.mcmaster.ca/theobio/worden/index.php/Cascades_Paper. It was previewing wrong (I didn't edit the source file) and displaying wrong in the saved page, even with action=purge. I finally looked in the working directory and found that the source file was right, but with an old modification date, so that the .html5 staying wrong because it was newer than the source file. I force-synced the source file and that fixed it.

    The question remains: how did the old content of the paper get in there?

     

Anonymous
Anonymous

Add attachments
Cancel