Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-34652

Alloy is not accesible from Web Content previews

    Details

      Description

      Alloy and other libraries included by default via properties (javascript.barebone.files or javascript.everything.files) are not accesible from templates in Web Content previews.

      Steps to reproduce:

      1. Create a Web Content structure (eg-structure) with a text field edditing the name to: txt

      2. Create a velocity template for this eg-structure with the next code:

       
      <div>$txt.getData()</div>
      <script>
      AUI().ready(function(A) {
          alert("hello world!");
      });
      </script>
      

      3. Create a Web Content from eg-structure. Title: WC1 , txt: hello

      4. Save. And generate preview (Control Panel> Web Content - Actions: view)

      Result: New page with the preview of the text: hello , but a javascript error is thrown in the js-console: ReferenceError: AUI is not defined

      Expected: An alert with the message 'hello world!' is displayed and the preview of the text: hello

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.gao Yang Gao (Inactive)
              Reporter:
              jose.jimenez Jose Jimenez
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 27 weeks, 2 days ago

                  Packages

                  Version Package
                  6.1.30 EE GA3
                  6.2.0 CE M5