Menu

#134 Error reporting for missing files in Media space less good

open
nobody
5
2012-08-15
2011-10-04
No

I get confusing messages (and no suggestion) when a missing source file is supposed to be in the Media space. See http://lalashan.mcmaster.ca/theobio/projects/index.php/Missing_media_file

Discussion

  • Lee Worden

    Lee Worden - 2011-10-04

    I've improved the error message (unless I missed what's wrong with it), have not yet sorted out why it only warns during preview.

    ps. There is no Media namespace: Media is an alias for locations in the Image namespace. I know it doesn't matter, and I don't know why it bothers me but it does :(

     
  • Lee Worden

    Lee Worden - 2011-10-04

    In your example when viewing the saved page, it doesn't warn that the source file is missing because it doesn't try to make anything, hence doesn't try to save the source files to the working directory, hence doesn't look for them.

    The only reason it warns while previewing is that when previewing it saves the source files to the working directory the first time it encounters a source-file tag, rather than waiting until it needs to make a project file. This is because the project file might be an image or a link, which will be built in a separate call to the web server, and at that time WW will not have access to the unsaved version of the page, so it won't be able to save the edited source files to the directory. There may be a better way to handle that, but it's what we have now.

     
  • Jonathan Dushoff

    Yes, the message is much better now. And I now realize that none of the preview messages provide the "click" option. But of course, we still want to warn without previewing.

    Sorry about the Media: thing!

     
  • Lee Worden

    Lee Worden - 2011-10-04

    No, we're not going to warn unless someone tries to make something.

     
  • Lee Worden

    Lee Worden - 2011-10-04

    Uh.. because it would be inefficient to load all the different pages implicated in the project from SQL and parse through them to find out whether the source files are there, without a need for them. I don't do it unless something needs to be made.

     
  • Jonathan Dushoff

    I edited the example page to be clearer. Not sure if the situation changed some, but the basic problem remains.

     
  • Lee Worden

    Lee Worden - 2012-07-07

    my explanation below implies that I don't really need to sync the project's source files the first time I encounter a source file while previewing, but the first time I encounter something that needs to be MADE while previewing.

    Also, I don't know why I would bother to do this, but I could just sync the stuff that's actually on the page at that time. Then I would need to sync everything that isn't on the page at make time. This would be more trouble than what we have now, and I don't see the benefit.

    But the option of syncing when there's a project-file tag or a source-file with an explicit or implicit make-and-display-project-file operation is much more reasonable. It would be the same as what we have now except it wouldn't have the confusion of behaving differently in preview than out when there's a page with source files but no make operations. Not a big priority though, I think.

     
  • Lee Worden

    Lee Worden - 2012-07-07

    Although there could be hand-constructed links to GetProjectFile urls that make things (would they be tweaked to operate within the preview session during preview?). In that case they would fail because the sync wouldn't happen.

     

Anonymous
Anonymous

Add attachments
Cancel