Moodle
  1. Moodle
  2. MDL-10272

flash applications can't call related XML if "Keep page navigation visible on the same page" is selected

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8.1
    • Fix Version/s: None
    • Component/s: Resource
    • Labels:
      None
    • Environment:
      Macos X
    • Affected Branches:
      MOODLE_18_STABLE
    • Rank:
      3695

      Description

      Unzip the attachment.
      Updload the folder to the "Files" folder of a course.
      Inside the folder you should find: home.swf and doc.xml
      Create a resource type "Link to a file or web site".
      Link the file home.swf you find inside the uploaded folder.
      Choose:
      -> window = "Same window"
      -> Keep page navigation visible on the same page = not selected
      Visit your resource page. All is fine.

      Choose:
      -> window = "Same window"
      -> Keep page navigation visible on the same page = selected
      Visit your resource page. The swf can't read the doc.xml

        Activity

        Hide
        Daniele Cordella added a comment -

        I am trying it on Macos X, with firefox 2.0.0.4, mysql 4.1.18 and php 4.3.6

        Show
        Daniele Cordella added a comment - I am trying it on Macos X, with firefox 2.0.0.4, mysql 4.1.18 and php 4.3.6
        Hide
        Daniele Cordella added a comment -

        the flash file is version 9

        Show
        Daniele Cordella added a comment - the flash file is version 9
        Hide
        Daniele Cordella added a comment -

        I found what has to be changed in order to let it work properly but... I can't understand the reason why it is not working with moodle code.
        Let me tell what I did in order to let you get your own conclusions.
        1) I embedded the .swf with:
        -> window = "Same window"
        -> Keep page navigation visible on the same page = selected
        It was not working. I edited the source and I coped it locally.

        2) I no longer linked in the moodle course the .swf but the .html provided by flash package.
        It was working fine.
        I copied the (ugly) html source locally.
        Take care. The .html file lives inside the same folder of the .swf and in the same folder of the .xml file. This means that inside the html file links (<param name="movie" value="home.swf" /> and <embed src="home.swf"...>) are local or, in other words, are "simple", "linear". (this step was not necessary but opened my mind)

        3) I run the moodle html file of the step 1 locally (pointing remote resources) and it was still not working.

        4) I moved resources files (.swf and .xml) from remote server to my local Mac.

        5) I manually changed moodle html file (see step 1) paths to point local .swf and .xml files and... all is now working fine.

        Definitly the reason is into paths.
        I changed this
        <!-- cutted from moodle page -->
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
        <param name="movie" value="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf" />
        <param name="autoplay" value="true" />
        <param name="loop" value="true" />
        <param name="controller" value="true" />
        <param name="scale" value="aspect" />
        <!-[if !IE]>->
        <object type="application/x-shockwave-flash" data="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf">
        <param name="controller" value="true" />
        <param name="autoplay" value="true" />
        <param name="loop" value="true" />
        <param name="scale" value="aspect" />
        <Unable to render embedded object: File (--<) not found.[endif]-->
        <a href="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf">http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf</a>
        <!-[if !IE]>->
        </object>
        <Unable to render embedded object: File (--<) not found.[endif]-->
        </object>
        <!-- end of cutted from moodle page -->

        to

        <!-- cutted from moodle page -->
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
        <param name="movie" value="home.swf" />
        <param name="autoplay" value="true" />
        <param name="loop" value="true" />
        <param name="controller" value="true" />
        <param name="scale" value="aspect" />
        <!-[if !IE]>->
        <object type="application/x-shockwave-flash" data="home.swf">
        <param name="controller" value="true" />
        <param name="autoplay" value="true" />
        <param name="loop" value="true" />
        <param name="scale" value="aspect" />
        <Unable to render embedded object: File (--<) not found.[endif]-->
        <a href="home.swf">home.swf</a>
        <!-[if !IE]>->
        </object>
        <Unable to render embedded object: File (--<) not found.[endif]-->
        </object>
        <!-- end of cutted from moodle page -->

        Why moodle paths (..file.php/134..) are not well understood by flash???????????????

        Show
        Daniele Cordella added a comment - I found what has to be changed in order to let it work properly but... I can't understand the reason why it is not working with moodle code. Let me tell what I did in order to let you get your own conclusions. 1) I embedded the .swf with: -> window = "Same window" -> Keep page navigation visible on the same page = selected It was not working. I edited the source and I coped it locally. 2) I no longer linked in the moodle course the .swf but the .html provided by flash package. It was working fine. I copied the (ugly) html source locally. Take care. The .html file lives inside the same folder of the .swf and in the same folder of the .xml file. This means that inside the html file links (<param name="movie" value="home.swf" /> and <embed src="home.swf"...>) are local or, in other words, are "simple", "linear". (this step was not necessary but opened my mind) 3) I run the moodle html file of the step 1 locally (pointing remote resources) and it was still not working. 4) I moved resources files (.swf and .xml) from remote server to my local Mac. 5) I manually changed moodle html file (see step 1) paths to point local .swf and .xml files and... all is now working fine. Definitly the reason is into paths. I changed this <!-- cutted from moodle page --> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf" /> <param name="autoplay" value="true" /> <param name="loop" value="true" /> <param name="controller" value="true" /> <param name="scale" value="aspect" /> <!- [if !IE] > -> <object type="application/x-shockwave-flash" data="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf"> <param name="controller" value="true" /> <param name="autoplay" value="true" /> <param name="loop" value="true" /> <param name="scale" value="aspect" /> < Unable to render embedded object: File (--<) not found. [endif] --> <a href="http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf"> http://www.eduiss.it/fad/file.php/134/Colloquio_Efficace/home.swf </a> <!- [if !IE] > -> </object> < Unable to render embedded object: File (--<) not found. [endif] --> </object> <!-- end of cutted from moodle page --> to <!-- cutted from moodle page --> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="home.swf" /> <param name="autoplay" value="true" /> <param name="loop" value="true" /> <param name="controller" value="true" /> <param name="scale" value="aspect" /> <!- [if !IE] > -> <object type="application/x-shockwave-flash" data="home.swf"> <param name="controller" value="true" /> <param name="autoplay" value="true" /> <param name="loop" value="true" /> <param name="scale" value="aspect" /> < Unable to render embedded object: File (--<) not found. [endif] --> <a href="home.swf">home.swf</a> <!- [if !IE] > -> </object> < Unable to render embedded object: File (--<) not found. [endif] --> </object> <!-- end of cutted from moodle page --> Why moodle paths (..file.php/134..) are not well understood by flash???????????????
        Hide
        Daniele Cordella added a comment -

        WORKAROUND FOUND
        flash understand very well moodle paths.

        I moved home.swf and doc.xml far from the moodle page of the step 1 (previous post). I moved them to a different folder. I canged paths into moodle html and, again, it was not working any more.

        By moving away ONLY the .swf file and leaving the doc.xml file close to the moodle html the swf is shown correctly.
        So... swf can be located wherever you like, the moodle html works fine (with correct links, of course) BUT THE FILE DOC.XML has to be placed close to the moodle html file.

        Is there a parameter call, of the flash embedding code, telling flash where the .xml file is?

        Show
        Daniele Cordella added a comment - WORKAROUND FOUND flash understand very well moodle paths. I moved home.swf and doc.xml far from the moodle page of the step 1 (previous post). I moved them to a different folder. I canged paths into moodle html and, again, it was not working any more. By moving away ONLY the .swf file and leaving the doc.xml file close to the moodle html the swf is shown correctly. So... swf can be located wherever you like, the moodle html works fine (with correct links, of course) BUT THE FILE DOC.XML has to be placed close to the moodle html file. Is there a parameter call, of the flash embedding code, telling flash where the .xml file is?
        Hide
        Daniele Cordella added a comment -

        Is there a way to embed the doc.xml file inside the .swf file?

        Show
        Daniele Cordella added a comment - Is there a way to embed the doc.xml file inside the .swf file?
        Hide
        Petr Škoda added a comment -

        see http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=1

        assigning to Nicolas - author of current resource embedding code

        Show
        Petr Škoda added a comment - see http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=1 assigning to Nicolas - author of current resource embedding code
        Hide
        Daniele Cordella added a comment -

        Thenk you Petr.
        Welcome Nicolas.
        I finally saw the page in link suggested by Petr.
        It was down some days before.
        As far as they state, it is importante to add the param
        <param name="base" value="http://www.example.com/pages/">

        It should be provided, by the Moodle GUI, a field for the "base" defaulting to the SWF folder.
        What do you think about?

        Show
        Daniele Cordella added a comment - Thenk you Petr. Welcome Nicolas. I finally saw the page in link suggested by Petr. It was down some days before. As far as they state, it is importante to add the param <param name="base" value="http://www.example.com/pages/"> It should be provided, by the Moodle GUI, a field for the "base" defaulting to the SWF folder. What do you think about?
        Hide
        Nicolas Connault added a comment -

        Please describe what you mean by "working fine" and "not working". With your example swf movie, I'm not sure what I'm supposed to see. I've tried all the different options you described, and in every case, this is what happens:

        1. The movie loads just fine (the intro works)
        2. The movie hangs after the intro fades out (the whole browser hangs in fact)
        3. After about 15 seconds, a dialog opens saying that a script is causing the page to render very slowly or to be hung, suggesting to stop its execution.
        4. If I say no, it repeats step 3 over and over again
        5. If I stop the script, the movie then loads with very strange sounds, and an interface that appears broken, flashing red/white background. A doctor-looking person walks in and speaks, then walks off, this cycle is repeated in an endless loop. There are buttons at the bottom of the movie, but none of them work.

        Show
        Nicolas Connault added a comment - Please describe what you mean by "working fine" and "not working". With your example swf movie, I'm not sure what I'm supposed to see. I've tried all the different options you described, and in every case, this is what happens: 1. The movie loads just fine (the intro works) 2. The movie hangs after the intro fades out (the whole browser hangs in fact) 3. After about 15 seconds, a dialog opens saying that a script is causing the page to render very slowly or to be hung, suggesting to stop its execution. 4. If I say no, it repeats step 3 over and over again 5. If I stop the script, the movie then loads with very strange sounds, and an interface that appears broken, flashing red/white background. A doctor-looking person walks in and speaks, then walks off, this cycle is repeated in an endless loop. There are buttons at the bottom of the movie, but none of them work.
        Hide
        Daniele Cordella added a comment -

        Ciao Nicolas and sorry for my delay. I am just returned from summer holidays.
        What I mean is:
        -> not working: The movie jumps back suddenly as a dirty old style vinile disk after few seconds.
        -> working: the movies flows correctly

        Is my answer stupid?
        I am quite always online now, so don't hesitate to ask again what you need.
        Ciao and thank you.

        Show
        Daniele Cordella added a comment - Ciao Nicolas and sorry for my delay. I am just returned from summer holidays. What I mean is: -> not working: The movie jumps back suddenly as a dirty old style vinile disk after few seconds. -> working: the movies flows correctly Is my answer stupid? I am quite always online now, so don't hesitate to ask again what you need. Ciao and thank you.
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d;

        lqjjLKA0p6

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
        Hide
        Daniele Cordella added a comment -

        This issue has been fixed in the past.
        It works fine now.
        Thanks all.

        Show
        Daniele Cordella added a comment - This issue has been fixed in the past. It works fine now. Thanks all.
        Hide
        Dan Poltawski added a comment -

        Closing based on Daniele's comment. Thanks

        Show
        Dan Poltawski added a comment - Closing based on Daniele's comment. Thanks

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: