GetProjectFile is doing make non-dynamically
Status: Beta
Brought to you by:
worden
[#544] succeeded at its main task, but I missed a piece: when called with make=yes, I think GetProjectFiles is doing the make operation before outputting the page with placeholder to load the file dynamically.
I hope this isn't too hard to unravel - the make step happens early, before it decides whether to stream the file raw, which happens before I do the placeholder.
Anonymous
So here's what the flow of GetProjectFiles looks like now that it includes the dynamic placeholder case:
WWInterface::default_display_mode(which only applies if not serving raw)display=linkanddisplay=downloadto avoid circular linksdisplay_file_contentsto get its contents and then append.htmlto its filename (to make sure the browser recognizes the contents as html when it's output)display_file_contentsto produce the output html representation of the file.It also looks like loading a file where the project directory doesn't exist is giving me an empty GPF page - I want at least a pulldown!
In fact let's be more specific: I want the following sequence to work, because that's what I'm trying to do right now. On a page that has no project, create an image file offline and then insert a project-file tag for it. Hit preview, in order to get an error message with a pulldown, use the 'reload' link in the pulldown by dragging it to another browser tab, thus opening the not-found project file in GPF.
Actually, my intention was to get that GPF so I could use the 'upload' link to upload the file, but now I realize that wouldn't work, because it only provides that link for source files (but maybe it shouldn't!).
Regardless, there should never be an empty GPF page without a file unless there's an error message explaining why, and there should always be a pulldown.
Adjusted GetProjectFile and found a bug in the js that was failing to display the pulldown. So this is better now.
There are issues where sometimes there's a pulldown in the error message and one outside, and where it shows up in different places at different times, and where the error message is sometimes duplicated into a floating bubble and sometimes not. I'll leave those for other tickets, and some of them will mutate as we go into the Comet interface which probably won't use those bubbles.