Menu

#580 preview with explicit project name

workingwiki
closed
None
5
2014-07-15
2014-07-15
Lee Worden
No

I had this problem trying to display an image file from a project on a different wiki. It may come up with other scenarios as well (a project from a different page, or whatever). I should be able to display the file just using <project-file filename=whatever project="pe-ww:http://wiki-url:project-name"/>. In fact, this works when the page is saved, but when previewing I get an error saying preview session number whatever does not exist.

Related

Bugs: #579

Discussion

  • Lee Worden

    Lee Worden - 2014-07-15

    OK, this may be an artifact of a bigger thing - it doesn't create a preview session if there are only project-file tags, no source files. It should create one the first time it makes, if there has been no sync operation.

     
  • Lee Worden

    Lee Worden - 2014-07-15

    Done.

    Changed

    if ( WWInterface::page_is_preview() ) {
        $request['okay-to-create-preview-session'] = true;
    }
    

    to

    if ( WWInterface::page_is_preview() or 
        ProjectEngineConnection::operation_includes_make( $request['operation']['name']) ) {
        $request['okay-to-create-preview-session'] = true;
    }
    

    Seems good now.

     
  • Lee Worden

    Lee Worden - 2014-07-15
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel