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

Javascript error can be thrown on browser's console when accessing a page containing the Form widget

    Details

      Description

      Hypothesis: this issue is intermittent. It only occurs when a particular set of characters, that represents the instanceId of the Form widget, is translated to a hash number that makes the JavaScript of that widget to be printed before the instantiation of the object Liferay.Session. So, in order to facilitate reproduction, I've exported a site containing two identical pages: one broken and another working.

      Note: the content of the exported site is a form with auto-save disabled and two widget pages containing, each one of them, a Form widget displaying the only form of the site.

      Steps to reproduce:

      1. Go to Site's Publishing > Import;
      2. Create a new import process and select the attached .lar file corresponding to the Liferay version you're testing;
      3. Once the process finishes successfully go to the "Bad Page": http://localhost:8080/web/guest/bad-page;
      4. Open the browser console and refresh the tab.

      Expected behavior:
      No error is thrown on browser's console.

      Actual behavior:
      The following error is thrown on the browser's console:

      Uncaught TypeError: Cannot read property 'get' of undefined
          at _com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormPortlet_INSTANCE_riuGC3jF8dEN_startAutoExtendSession (bad-page:10941)
          at _com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormPortlet_INSTANCE_riuGC3jF8dEN_initForm (bad-page:10970)
          at bad-page:10980
          at bad-page:10993
          at args.<computed> (aui_sandbox.js:34)
          at YUI._notify (aui.js:1108)
          at aui.js:1245
          at YUI._notify (aui.js:1108)
          at aui.js:1245
          at YUI._notify (aui.js:1108)
      

      It might take using incognito mode and/or restarting the server.

        Attachments

          Activity

            People

            • Assignee:
              chao.wang Chao Wang
              Reporter:
              rodrigo.paulino Rodrigo Paulino
              Participants of an Issue:
              Recent user:
              Cleydyr Albuquerque
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                18 weeks, 6 days ago

                Packages

                Version Package
                7.1.10 DXP FP18
                7.1.X
                7.2.10 DXP FP6
                7.2.X
                Master