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

Publish fails when add a webcontent after create Display Page Templates

    Description

    Steps to reproduce:

    1. Create a site > Activate local live staging
    2. Create a Web Content with that structure
    3. Import test fragments from dependencies folder(E:\7.3.x\portal-web\test\functional\com\liferay\portalweb\dependencies\fragment-collection.zip
    4. Add a display page with fragments mapped to Basic Web Content
    5. Mark the display page as default
    6. Add a web content article
    7. publish

    Expected result: Can be published successfully.

    Actual result: Publish fails.

      [exec] com.liferay.poshi.runner.PoshiRunner > test[LocalFile.DisplayPagesWithMapping#MapManualURLToLinkFragment] STANDARD_ERROR
         [exec]     Starting ChromeDriver 2.37.544315 (730aa6a5fdba159ac9f4c1e8cbc59bf1b5ce12b7) on port 13253
         [exec]     Only local connections are allowed.
         [exec]     Jan 24, 2021 5:13:41 PM org.openqa.selenium.remote.ProtocolHandshake createSession
         [exec]     INFO: Detected dialect: OSS
         [exec] 01:14:43,654 INFO  [http-nio-8080-exec-11][CompanyIndexFactory:57] liferay-40706
         [exec] 01:15:05,810 ERROR [com.liferay.portal.template.freemarker.internal.FreeMarkerManager-2][runtime:59] Error executing FreeMarker template
         [exec] FreeMarker template error:
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 
         [exec] Java stack trace (for programmers):
         [exec] ----
         [exec] freemarker.template.TemplateModelException: [... Exception message was already printed; see it above ...]
         [exec] 	at com.liferay.portal.template.freemarker.internal.RestrictedLiferayObjectWrapper.wrap(RestrictedLiferayObjectWrapper.java:232)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate$CachableDefaultMapAdapter.get(FreeMarkerTemplate.java:227)
         [exec] 	at freemarker.core.Environment.getGlobalVariable(Environment.java:2102)
         [exec] 	at freemarker.core.Environment.getVariable(Environment.java:2091)
         [exec] 	at freemarker.core.Identifier._eval(Identifier.java:39)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.ExistsExpression._eval(ExistsExpression.java:49)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:179)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:165)
         [exec] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:331)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:337)
         [exec] 	at freemarker.core.Environment.include(Environment.java:2694)
         [exec] 	at freemarker.core.Environment.initializeImportLibNamespace(Environment.java:2845)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2832)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2761)
         [exec] 	at freemarker.template.Configuration.doAutoImports(Configuration.java:3511)
         [exec] 	at freemarker.template.Configuration.doAutoImportsAndIncludes(Configuration.java:3496)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Environment.process(Environment.java:309)
         [exec] 	at freemarker.template.Template.process(Template.java:383)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.lambda$processTemplate$0(FreeMarkerTemplate.java:157)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerManager.lambda$render$1(FreeMarkerManager.java:598)
         [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         [exec] 	at java.lang.Thread.run(Thread.java:745)
         [exec] 01:15:05,823 ERROR [http-nio-8080-exec-11][FragmentRendererControllerImpl:120] Unable to render content of fragment entry 0:com.liferay.fragment.exception.FragmentEntryContentException: FreeMarker syntax is invalid.
         [exec] 
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 01:15:05,835 ERROR [com.liferay.portal.template.freemarker.internal.FreeMarkerManager-2][runtime:59] Error executing FreeMarker template
         [exec] FreeMarker template error:
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 
         [exec] Java stack trace (for programmers):
         [exec] ----
         [exec] freemarker.template.TemplateModelException: [... Exception message was already printed; see it above ...]
         [exec] 	at com.liferay.portal.template.freemarker.internal.RestrictedLiferayObjectWrapper.wrap(RestrictedLiferayObjectWrapper.java:232)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate$CachableDefaultMapAdapter.get(FreeMarkerTemplate.java:227)
         [exec] 	at freemarker.core.Environment.getGlobalVariable(Environment.java:2102)
         [exec] 	at freemarker.core.Environment.getVariable(Environment.java:2091)
         [exec] 	at freemarker.core.Identifier._eval(Identifier.java:39)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.ExistsExpression._eval(ExistsExpression.java:49)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:179)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:165)
         [exec] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:331)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:337)
         [exec] 	at freemarker.core.Environment.include(Environment.java:2694)
         [exec] 	at freemarker.core.Environment.initializeImportLibNamespace(Environment.java:2845)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2832)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2761)
         [exec] 	at freemarker.template.Configuration.doAutoImports(Configuration.java:3511)
         [exec] 	at freemarker.template.Configuration.doAutoImportsAndIncludes(Configuration.java:3496)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Environment.process(Environment.java:309)
         [exec] 	at freemarker.template.Template.process(Template.java:383)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.lambda$processTemplate$0(FreeMarkerTemplate.java:157)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerManager.lambda$render$1(FreeMarkerManager.java:598)
         [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         [exec] 	at java.lang.Thread.run(Thread.java:745)
         [exec] 01:15:05,837 ERROR [http-nio-8080-exec-11][FragmentRendererControllerImpl:120] Unable to render content of fragment entry 0:com.liferay.fragment.exception.FragmentEntryContentException: FreeMarker syntax is invalid.
         [exec] 
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 01:15:05,840 ERROR [com.liferay.portal.template.freemarker.internal.FreeMarkerManager-2][runtime:59] Error executing FreeMarker template
         [exec] FreeMarker template error:
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 
         [exec] Java stack trace (for programmers):
         [exec] ----
         [exec] freemarker.template.TemplateModelException: [... Exception message was already printed; see it above ...]
         [exec] 	at com.liferay.portal.template.freemarker.internal.RestrictedLiferayObjectWrapper.wrap(RestrictedLiferayObjectWrapper.java:232)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate$CachableDefaultMapAdapter.get(FreeMarkerTemplate.java:227)
         [exec] 	at freemarker.core.Environment.getGlobalVariable(Environment.java:2102)
         [exec] 	at freemarker.core.Environment.getVariable(Environment.java:2091)
         [exec] 	at freemarker.core.Identifier._eval(Identifier.java:39)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.ExistsExpression._eval(ExistsExpression.java:49)
         [exec] 	at freemarker.core.Expression.eval(Expression.java:101)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:179)
         [exec] 	at freemarker.core.Expression.evalToBoolean(Expression.java:165)
         [exec] 	at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:331)
         [exec] 	at freemarker.core.Environment.visit(Environment.java:337)
         [exec] 	at freemarker.core.Environment.include(Environment.java:2694)
         [exec] 	at freemarker.core.Environment.initializeImportLibNamespace(Environment.java:2845)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2832)
         [exec] 	at freemarker.core.Environment.importLib(Environment.java:2761)
         [exec] 	at freemarker.template.Configuration.doAutoImports(Configuration.java:3511)
         [exec] 	at freemarker.template.Configuration.doAutoImportsAndIncludes(Configuration.java:3496)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Configurable.doAutoImportsAndIncludes(Configurable.java:3149)
         [exec] 	at freemarker.core.Environment.process(Environment.java:309)
         [exec] 	at freemarker.template.Template.process(Template.java:383)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerTemplate.lambda$processTemplate$0(FreeMarkerTemplate.java:157)
         [exec] 	at com.liferay.portal.template.freemarker.internal.FreeMarkerManager.lambda$render$1(FreeMarkerManager.java:598)
         [exec] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
         [exec] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         [exec] 	at java.lang.Thread.run(Thread.java:745)
         [exec] 01:15:05,841 ERROR [http-nio-8080-exec-11][FragmentRendererControllerImpl:120] Unable to render content of fragment entry 0:com.liferay.fragment.exception.FragmentEntryContentException: FreeMarker syntax is invalid.
         [exec] 
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
         [exec] 	- Failed at: #if user??  [in template "com.liferay.portal.template.freemarker_6.0.22_CLASS_LOADER_CONTEXT_FTL_liferay.ftl" at line 17, column 1]
         [exec] ----
         [exec] 01:15:05,843 ERROR [com.liferay.portal.template.freemarker.internal.FreeMarkerManager-2][runtime:59] Error executing FreeMarker template
         [exec] FreeMarker template error:
         [exec] Denied access to model object as it does not belong to current company 40706
         [exec] 
         [exec] ----
         [exec] FTL stack trace ("~" means nesting-related):
    

    Affect testcases:
    LocalFile.DisplayPagesWithStagingAndWebContent#PublishDisplayPageMarkedAsDefault LocalFile.DisplayPagesWithStagingAndWebContent#PublishEditedDisplayPage

      Attachments

      1. bbb.gif
        bbb.gif
        7.89 MB
      2. console&see more detail.gif
        console&see more detail.gif
        9.01 MB
      3. fail.png
        fail.png
        27 kB
      4. fragment-collection.zip
        1.07 MB
      5. message.png
        message.png
        38 kB

        Issue Links

          Activity

            People

            Assignee:
            melody.wu Melody Wu
            Reporter:
            melody.wu Melody Wu
            Participants of an Issue:
            Recent user:
            David Gutiérrez Mesa
            Engineering Assignee:
            Daniel Couso
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              19 weeks, 2 days ago

                Packages

                Version Package
                7.2.10 DXP FP11
                7.2.10.3 DXP SP4
                7.2.X
                7.3.X
                7.3.10 DXP FP1
                7.3.10.1 DXP SP1
                7.3.6 CE GA7