<div dir="ltr">The debug.log shows the following when I click 'play' with the dev version of upload.php ..<div><br></div><div><div>2016-04-15 11:02:53 /var/www/html/website_code/php/database_library.php175Running : SELECT * FROM sitedetails</div><div>2016-04-15 11:02:53 /var/www/html/editor/upload.php28upload: Array</div><div>(</div><div>    [fileupdate] => 0</div><div>    [filename] => USER-FILES/2-isnsh-Nottingham/preview.xml</div><div>    [lo_data] => %7B%22attributes%22%3A%7B%22nodeName%22%3A%22learningObject%22%2C%22editorVersion%22%3A%223%22%2C%22targetFolder%22%3A%22Nottingham%22%2C%22name%22%3A%22Learning%20Object%20Title%22%2C%22language%22%3A%22%22%2C%22navigation%22%3A%22Linear%22%2C%22textSize%22%3A%2212%22%2C%22theme%22%3A%22darkgrey%22%2C%22displayMode%22%3A%22default%22%2C%22responsive%22%3A%22true%22%7D%2C%22children%22%3A%7B%220%22%3A%7B%22attributes%22%3A%7B%22nodeName%22%3A%22bullets%22%2C%22linkID%22%3A%22PG1460718054579%22%2C%22name%22%3A%22Enter%20Page%20Title%22%2C%22delaySecs%22%3A%221%22%2C%22showBullets%22%3A%221%22%2C%22showPanel%22%3A%221%22%2C%22panelWidth%22%3A%22Medium%22%7D%2C%22data%22%3A%22Enter%20text%20for%20the%20page%20here%22%7D%7D%7D</div><div>    [absmedia] => <a href="https://xerte-beta.bris.ac.uk/USER-FILES/2-isnsh-Nottingham/">https://xerte-beta.bris.ac.uk/USER-FILES/2-isnsh-Nottingham/</a></div><div>    [template_id] => 2</div><div>)</div><div><br></div><div>2016-04-15 11:02:53 /var/www/html/editor/upload.php53upload (lo_data): %7B%22attributes%22%3A%7B%22nodeName%22%3A%22learningObject%22%2C%22editorVersion%22%3A%223%22%2C%22targetFolder%22%3A%22Nottingham%22%2C%22name%22%3A%22Learning%20Object%20Title%22%2C%22language%22%3A%22%22%2C%22navigation%22%3A%22Linear%22%2C%22textSize%22%3A%2212%22%2C%22theme%22%3A%22darkgrey%22%2C%22displayMode%22%3A%22default%22%2C%22responsive%22%3A%22true%22%7D%2C%22children%22%3A%7B%220%22%3A%7B%22attributes%22%3A%7B%22nodeName%22%3A%22bullets%22%2C%22linkID%22%3A%22PG1460718054579%22%2C%22name%22%3A%22Enter%20Page%20Title%22%2C%22delaySecs%22%3A%221%22%2C%22showBullets%22%3A%221%22%2C%22showPanel%22%3A%221%22%2C%22panelWidth%22%3A%22Medium%22%7D%2C%22data%22%3A%22Enter%20text%20for%20the%20page%20here%22%7D%7D%7D</div><div>2016-04-15 11:02:53 /var/www/html/editor/upload.php57upload (lo_data, local_refs): {"attributes":{"nodeName":"learningObject","editorVersion":"3","targetFolder":"Nottingham","name":"Learning Object Title","language":"","navigation":"Linear","textSize":"12","theme":"darkgrey","displayMode":"default","responsive":"true"},"children":{"0":{"attributes":{"nodeName":"bullets","linkID":"PG1460718054579","name":"Enter Page Title","delaySecs":"1","showBullets":"1","showPanel":"1","panelWidth":"Medium"},"data":"Enter text for the page here"}}}</div><div>2016-04-15 11:02:53 /var/www/html/editor/upload.php63upload: decoded json</div></div><div><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Naveed</div><div class="gmail_extra"><br><div class="gmail_quote">On 15 April 2016 at 11:46, Tom Reijnders <span dir="ltr"><<a href="mailto:reijnders@tor.nl" target="_blank">reijnders@tor.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Can you please place this version of upload.php in the editor
    folder. It's the development version with debugging statements
    added.<br>
    <br>
    Then, please make sure $development is set to true, and after trying
    to saving data, look at what is in the debug.log file, and report
    back please.<br>
    <br>
    Tom<br>
    <br>
    <div>Op 15-4-2016 om 12:20 schreef Naveed
      Hashmi:<br>
    </div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">
        <div>Hi Pat,</div>
        <div><br>
        </div>
        <div>Do you mean /editor/upload.php?</div>
        <div><br>
        </div>
        <div>See attached, this is how the upload.php looks at the
          moment.</div>
        <div><br>
        </div>
        <div>Thanks for your help, </div>
        <div><br>
        </div>
        <div>Naveed</div>
        <div><br>
        </div>
        ---------------
        <div>From Pat ...</div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">How much of your editor.php is commented out, as make_refs_local seems </span></div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">to be returning something which looks ok to me</span></div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
        <div><span style="color:rgb(0,0,0);white-space:pre-wrap">(I am running out of ideas, sorry)</span></div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 15 April 2016 at 10:23, Naveed
          Hashmi <span dir="ltr"><<a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank">Naveed.Hashmi@bristol.ac.uk</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div>This is correct, the <span style="color:rgb(0,0,0);white-space:pre-wrap">1 is the "true" being echoed out at the end, i.e: "</span><span style="white-space:pre-wrap;color:rgb(0,0,0)">echo true;"  (setting to this 'false' removes the '1').</span></div>
              <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
              <div>I've commented out the print_r, i.e.
                "//print_r($relreffedjsonstr);" and the dialogue box now
                shows "This project does not contain any pages."  </div>
              <div><br>
              </div>
              <div>See attached pic, results of chrome console when
                enabling/disabling the print_r.</div>
              <div><br>
              </div>
              <div>Thanks,</div>
              <div><br>
              </div>
              <div>Naveed</div>
              <div><br>
              </div>
              ----------------------------------------
              <div>From Pat:</div>
              <div><br>
                <div><span style="color:rgb(0,0,0);white-space:pre-wrap">The 1 is the "true" I assume being echoed out at the end?</span></div>
                <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
                <div><span style="color:rgb(0,0,0);white-space:pre-wrap">Or is that still commented out?</span></div>
                <div><span style="color:rgb(0,0,0);white-space:pre-wrap">
</span></div>
                <div><span style="color:rgb(0,0,0);white-space:pre-wrap">Try commenting out the print_r?</span></div>
              </div>
            </div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On 15 April 2016 at 08:47,
                    Naveed Hashmi <span dir="ltr"><<a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank"></a><a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank">Naveed.Hashmi@bristol.ac.uk</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">When clicking 'play', the error box
                        displays, but the response now shows the
                        following :-
                        <div><br>
                        </div>
                        <div>{"attributes":{"nodeName":"learningObject","editorVersion":"3","targetFolder":"Nottingham","name":"Learning
                          Object
                          Title","language":"","navigation":"Linear","textSize":"12","theme":"default","displayMode":"default","responsive":"true"},"children":{"0":{"attributes":{"nodeName":"bullets","linkID":"PG1460705925683","name":"bullets","delaySecs":"1","showBullets":"1","showPanel":"1","panelWidth":"Medium"},"data":"<p><span
                          style=\"font-family: 'Open Sans', sans-serif;
                          background-color: rgb(255, 255,
                          255);\">bullets</span></p>\n"}}}1<br>
                        </div>
                        <div><br>
                        </div>
                        <div>The '1' at the end looks out of place?</div>
                        <div><br>
                        </div>
                        <div>Thanks,</div>
                        <div><br>
                        </div>
                        <div>Naveed</div>
                        <div><br>
                        </div>
                      </div>
                      <div>
                        <div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On 14 April 2016 at
                              16:45, Pat L (pgogy) <span dir="ltr"><<a href="mailto:info@pgogywebstuff.com" target="_blank"></a><a href="mailto:info@pgogywebstuff.com" target="_blank">info@pgogywebstuff.com</a>></span>
                              wrote:<br>
                              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                <div>Sorry
                                  <div>By console i mean the chrome dev
                                    console on the network tab</div>
                                  <span><br>
                                    <br>
                                    -------- Original message --------<br>
                                    From: Naveed Hashmi <<a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank"></a><a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank">Naveed.Hashmi@bristol.ac.uk</a>>
                                    <br>
                                  </span><span>Date: 14/04/2016 16:30
                                    (GMT+00:00) <br>
                                    To: "Pat L (pgogy)" <<a href="mailto:info@pgogywebstuff.com" target="_blank"></a><a href="mailto:info@pgogywebstuff.com" target="_blank">info@pgogywebstuff.com</a>>
                                    <br>
                                  </span>
                                  <div>
                                    <div>Cc: Xerte discussion list <<a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank"></a><a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a>>
                                      <br>
                                      Subject: Re: Error message when
                                      playing/publishing content of type
                                      Text <br>
                                      <br>
                                      <div dir="ltr">On the command line
                                        (console) ... I see ..
                                        <div><br>
                                        </div>
                                        <div>
                                          <div>$ php upload.php</div>
                                          <div><br>
                                          </div>
                                          <div>/var/www/html/website_code/php/database_library.php175Running
                                            : SELECT * FROM sitedetails</div>
                                          <div>Session is invalid or
                                            expired<br>
                                          </div>
                                        </div>
                                        <div><br>
                                        </div>
                                        <div>Thanks</div>
                                        <div><br>
                                        </div>
                                        <div>Naveed</div>
                                      </div>
                                      <div class="gmail_extra"><br>
                                        <div class="gmail_quote">On 14
                                          April 2016 at 16:25, Pat L
                                          (pgogy) <span dir="ltr"><<a href="mailto:info@pgogywebstuff.com" target="_blank"></a><a href="mailto:info@pgogywebstuff.com" target="_blank">info@pgogywebstuff.com</a>></span>
                                          wrote:<br>
                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                            <div>Do you see anything in
                                              console?<span><br>
                                                <br>
                                                -------- Original
                                                message --------<br>
                                                From: Naveed Hashmi <<a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank"></a><a href="mailto:Naveed.Hashmi@bristol.ac.uk" target="_blank">Naveed.Hashmi@bristol.ac.uk</a>>
                                                <br>
                                              </span><span>Date:
                                                14/04/2016 16:14
                                                (GMT+00:00) <br>
                                                To: Xerte discussion
                                                list <<a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank"></a><a href="mailto:xerte@lists.nottingham.ac.uk" target="_blank">xerte@lists.nottingham.ac.uk</a>>
                                                <br>
                                              </span><span>Cc: "Pat
                                                Lockley (Pgogy)" <<a href="mailto:info@pgogywebstuff.com" target="_blank"></a><a href="mailto:info@pgogywebstuff.com" target="_blank">info@pgogywebstuff.com</a>>
                                                <br>
                                                Subject: Re: Error
                                                message when
                                                playing/publishing
                                                content of type Text <br>
                                                <br>
                                              </span>
                                              <div>
                                                <div>
                                                  <div dir="ltr">
                                                    <div>I've enabled
                                                      (uncommented)
                                                      make_ref_locals,
                                                      and the error
                                                      displays with the
                                                      following now in
                                                      place (semi colon
                                                      in place at the
                                                      end of the new
                                                      line) ...<br>
                                                    </div>
                                                    <div><br>
                                                    </div>
                                                    <div>
                                                      <div>$relreffedjsonstr
                                                        =
                                                        make_refs_local(urldecode($lo_data),
$_POST['absmedia']);</div>
                                                      <div>print_r($relreffedjsonstr);</div>
                                                    </div>
                                                    <div><br>
                                                    </div>
                                                    <div>Thanks,</div>
                                                    <div><br>
                                                    </div>
                                                    <div>Naveed</div>
                                                    <div><br>
                                                    </div>
                                                  </div>
                                                  <div class="gmail_extra"><br>
                                                    <div class="gmail_quote">On
                                                      14 April 2016 at
                                                      16:06, Pat Lockley
                                                      (Pgogy) <span dir="ltr"><<a href="mailto:info@pgogywebstuff.com" target="_blank"></a><a href="mailto:info@pgogywebstuff.com" target="_blank">info@pgogywebstuff.com</a>></span>
                                                      wrote:<br>
                                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On
                                                          2016-04-14
                                                          10:59, Naveed
                                                          Hashmi wrote:<br>
                                                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                          Hi Pat,<br>
                                                          <br>
                                                          Followed you
                                                          instructions,
                                                          and the Error
                                                          message (box)
                                                          displays with<br>
                                                          the
                                                          make_refs_local
                                                          function
                                                          commented out
                                                          and the
                                                          additional
                                                          line<br>
                                                          inserted.<br>
                                                          <br>
                                                          It doesn't
                                                          like the
                                                          additional
                                                          line, re:
                                                          'print_r($relreffedjsonstr)'<br>
                                                          </blockquote>
                                                          <br>
                                                        </span>
                                                        uncomment
                                                        make_ref_locals<br>
                                                        and add a semi
                                                        colon at the end
                                                        of the new line
                                                        if I forgot<br>
                                                      </blockquote>
                                                    </div>
                                                    <br>
                                                  </div>
                                                </div>
                                              </div>
                                            </div>
                                          </blockquote>
                                        </div>
                                        <br>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      </div></div><pre>This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.
</pre>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Xerte mailing list
<a href="mailto:Xerte@lists.nottingham.ac.uk" target="_blank">Xerte@lists.nottingham.ac.uk</a>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div></div>