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

Investigate invalid syntax on first page load after deploy of app-builder-web

    Details

      Description

      Ivan Zaera, Chema Balsas suggested we talk about this error that I ran into while preparing:

      https://github.com/brianchandotcom/liferay-portal/pull/77325

      I noticed that any time after deploying the app-builder-web module and loading its "edit_form_view.jsp" view, the page would be totally broken due to a syntax error:

      Uncaught SyntaxError: Unexpected token null

      If you look at the actual source you'll see this (line breaks inserted for readability — ignore the curlies that Jira added):

      Liferay.Loader.require(
      {{ 'metal-dom/src/all/dom',}}
      {{ 'clay-tooltip/src/ClayTooltip',}}
      {{ 'metal-position/src/Position',}}
      {{ 'frontend-taglib/translation_manager/TranslationManager.es',}}
      {{ 'metal-dom/src/dom',}}
      {{ 'null',}}
      {{ 'null',}}
      {{ 'app-builder-web@1.0.0/js/pages/form-view/EditFormViewApp.es',}}
      {{ 'clay-dropdown/src/ClayDropdown',}}
      {{ function(metalDomSrcAllDom,}}
      {{ clayTooltipSrcClayTooltip,}}
      {{ metalPositionSrcPosition,}}
      {{ frontendTaglibTranslation_managerTranslationManagerEs,}}
      {{ metalDomSrcDom,}}
      {{ null,}}
      {{ null1,}}
      {{ appBuilderWeb100JsPagesFormViewEditFormViewAppEs,}}
      {{ clayDropdownSrcClayDropdown) {}}

      Note the "null" and "null1" there indicating, some missing dependencies. It may be a misconfiguration, but it seems that we should never emit a bare null1 (not a string) even if things are misconfigured.

      On the next refresh, everything loads fine.

      No errors or any other entries in the tomcat output.

      To get to this page:

      • Control Panel → App Builder → Custom Objects → View (or create) an existing object

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                greg.hurrell Greg Hurrell
                Recent user:
                Clarissa Velazquez
                Participants of an Issue:
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.2.10 DXP FP2
                  7.2.10.1 DXP SP1
                  7.2.X
                  Master