Uploaded image for project: 'ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)'
  1. ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  2. LEP-3118

Very strange bug -- Document library. playing flash in journal content. href="/c"

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.2
    • Component/s: None
    • Labels:
      None

      Description

      Very odd bug.

      Check this out:

      To play our flash movies, we use the following solution.

      1. upload flash movies into document library into a root level folder.
      2. create a structure with document library choice.
      3. create a template using jquery and media plugin to play flash movie.
      (see below for samples)

      On the first page of community site, I had the content with the movie. I then add a link then is not known to the system so liferay automatically redirects to http://localhost:8080/ --> /c

      Step 1. Goto first page of site (you should see flash movie playing)
      Step 2. click on unknown local link or goto http://localhost:8080/
      Result – Browser asks you to download swf ( titled whatever you called the movie in the document library)

      If I copy the flash movie to the server and then for the movie src use /html/flash/mymovie.swf, I do not get this problem. This is what leads me to believe it must be an issue with requesting files from document libary.

      Please advise... I've made this major, because my users can not upload and select flash movies until this is resolved.

      Please note: I also used journal content instead of flash portlet because the jc portlet provides versioning as well is easier to edit structure content for the end user. You can also create custom structures to match flash movies. If you see the example below, the user is able to pass text to the flash movie for display. The power of the templates combined with jQuery is immense. Thanks for this feature set.

      PS – I hope this helps others as well. If you think it is useful, please add to Wiki.

      Here is the structure:
      <root>
      <dynamic-element name='text_line01' type='text'></dynamic-element>
      <dynamic-element name='text_line02' type='text'></dynamic-element>
      <dynamic-element name='text_line03' type='text'></dynamic-element>
      <dynamic-element name='movie' type='document_library'></dynamic-element>
      <dynamic-element name='width' type='text'></dynamic-element>
      <dynamic-element name='height' type='text'></dynamic-element>
      <dynamic-element name='scale' type='list'>
      <dynamic-element name='noscale' type='Do not scale'> </dynamic-element>
      <dynamic-element name='showall' type='Show all'></dynamic-element>
      </dynamic-element>
      </root>

      Here is the velocity template:
      <script type="text/javascript">

      // NOTE: important to have wmode and scale:noscale to allow menu /css layers to layer over flash movie.

      function startMovie() {
      jQuery('.h9media').media({
      src: '$movie.data',
      width: '$width.data', height: '$height.data',
      flashvars :

      { text_line01:'$text_line01.data', text_line02:'$text_line02.data', text_line03:'$text_line03.data' }

      ,
      params:

      { wmode:'transparent' , scale:'$scale.data' }


      });
      }

      jQuery(document).ready(function() {
      startMovie();
      });

      </script>
      <table height="$height.data" width="$width.data" border="0"><tr><td height="$height.data" width="$width.data">
      <div id="movie" name="movie" >
      <embed src="" class="h9media"></embed>
      </div>
      </td></tr></table>

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                4.3.2