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

ddm_form.js is not notified on defaultLangugage change due to js error in WC

    Details

      Description

      Reproduction:

      1.) Start the system and navigate to Control Panel → Configuration → System Settings → Web Content. Under System scope select Administration and enable ‘Changeable Default Language’.
      2.) Go to Content / Web Content -> Create basic web content
      3.) Change the default Language at the top

      Expected: No error in console
      Actual: There is an error in console and _OnDeafultLocaleChanged was not called in ddm_form.js due to this error.

      Root Cause:
      In journal-web / .... / content.jsp

      Liferay.after(
      		'inputLocalized:localeChanged',
      		function(event) {
      			var selectedLanguageId = event.item.getAttribute('data-value')
      
      			var languageIdInput = document.getElementById(this.ns('languageId'));
      
      			languageIdInput.value = selectedLanguageId;
      		}
      	);
      

      this.ns is not a function at least not in this scope.

      While this code is 7.1 specific, based on the original commits of master and 7.2.x, it should update the hidden input field of the languageId in web-content.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              yang.cao Yang Cao
              Reporter:
              norbert.nemeth Norbert Németh
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 11 weeks, 6 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP18
                  7.1.10.5 SP5
                  7.1.X