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

breadcrumbUtil is null in Breadcrumb Widget Template

    Details

    • Branch Version/s:
      7.2.x
    • Backported to Branch:
      Committed
    • Fix Priority:
      3

      Description

      Reproduction Steps

      1. Go to Site Settings -> Site Builder -> Widget Templates
      2. Click on the + sign -> Breadcrumb Template
      3. Title: Test
      4. Copy-paste the content of [^template_breadcrumb.txt]→Save
      5. Go to System Settings -> Template Engines -> Freemarker Engine -> Remove "java.lang.Class" from restricted classes.
      6. Go to System Settings -> Template Engines -> Freemarker Engine -> Remove "serviceLocator" from restricted variables.
      7. Restart bundle.
      8. Go to a widget page
      9. Place a Breadcrumb widget onto the page
      10. Click on the 3-dots→Configuration
      11. Under Display Template, choose Test→Save
      12. Close the popup
      13. Inspect the content of the page

      Expected Behavior
      There are no errors and the template is rendered.

      Actual Behavior
      This error can be seen:

      Errors received:

      The following has evaluated to null or missing:
      ==> breadcrumbUtil.getLayoutBreadcrumbEntries  [in template "20101#20128#33814" at line 52, column 18]
      
      ----
      Tip: It's the step after the last dot that caused this error, not those before it.
      ----
      Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
      

        Attachments

          Activity

            People

            Assignee:
            summer.zhang Summer Zhang
            Reporter:
            istvan.dezsi Istvan Dezsi
            Participants of an Issue:
            Recent user:
            Clarissa Velazquez
            Engineering Assignee:
            Peter Petrekanics
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 weeks, 1 day ago

                Packages

                Version Package
                7.2.10 DXP FP15
                7.2.X