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

Liferay template-editor generates invalid Freemarker code for embedded geolocation fields

    Details

      Description

      Reproduction steps:

      1. Start latest master bundle
      2. Create a structure named "struct1"
      3. Add a Separator to the structure
      4. Add a Geolocation field embedded into the Separator
      5. Add a template to "struct1"
      6. Click on the Geolocation field on the left, and its pattern will be inserted into the template
      7. Save it and create a web content from "struct1"
      8. Select a location for the GeoLocation field, save the content
      9. Preview the content (eye icon in the "Default Template" section)

      Actual result: the map is not shown, you can only see an empty <div> element, and the following javascript error:

      Uncaught Error: Map container not found.
          at e._initContainer (leaflet.js:5)
          at e.initialize (leaflet.js:5)
          at new e (leaflet.js:5)
          at Object.t.map (leaflet.js:5)
          at MapOpenStreetMap._createMap (?
      ...
      

      Expected: the map with the selected location should be shown

      This is a part of the generated FTL template:

      <@liferay_map["map-display"]
      	geolocation=true
      	latitude=latitude
      	longitude=longitude
      	name="Text4vud.Geolocation77ue${randomizer.nextInt()}"
      />
      

      When the name attribute doesn't contain "." character, it should look like this:

      <@liferay_map["map-display"]
      	geolocation=true
      	latitude=latitude
      	longitude=longitude
      	name="Text4vud_Geolocation77ue${randomizer.nextInt()}"
      />
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raven.song Raven Song
              Reporter:
              vendel.toreki Vendel Töreki
              Participants of an Issue:
              Recent user:
              Jason Pince
              Engineering Assignee:
              Vendel Töreki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 10 weeks, 4 days ago

                  Packages

                  Version Package
                  7.3.0 CE GA1
                  7.3.10 DXP GA1
                  Master