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

Guest users cannot see blog image for a site imported as copy as new

    Details

      Description

      Reproducing Steps

      1. Create a new site.
      2. Add a new blog post that includes cover image you've drag-and-dropped in the edit view.
      3. Export the site enabling Blogs and Export Permissions. Download resulting lar.
      4. Create a second site.
      5. Import the downloaded lar enabling Import Permissions and Copy as New strategy.
      6. Create a new widget page and add the blogs portlet.
      7. Log out and visit the page as a guest.
        Expected: The blog post is shown with the image.
        Observed: The blog post is shown but the image is missing.
        The log shows the error trace:
        2020-04-15 10:58:21.859 ERROR [http-nio-8080-exec-8][IncludeTag:128] Current URL /web/site02c generates exception: com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 20101 must have VIEW permission for com.liferay.portal.kernel.repository.model.Folder 38257
        com.liferay.portal.kernel.security.auth.PrincipalException$MustHavePermission: User 20101 must have VIEW permission for com.liferay.portal.kernel.repository.model.Folder 38257
        	at com.liferay.portal.kernel.internal.security.permission.resource.DefaultModelResourcePermission.check(DefaultModelResourcePermission.java:54)
        	at com.liferay.portal.kernel.security.permission.resource.ModelResourcePermissionUtil.check(ModelResourcePermissionUtil.java:39)
        	at com.liferay.portal.repository.RepositoryProviderImpl.checkRepositoryAccess(RepositoryProviderImpl.java:411)
        	at com.liferay.portal.repository.RepositoryProviderImpl.getLocalRepository(RepositoryProviderImpl.java:300)
        	at com.liferay.portal.repository.RepositoryProviderImpl.getFileEntryLocalRepository(RepositoryProviderImpl.java:93)
        	at com.liferay.document.library.repository.portlet.file.repository.internal.PortletFileRepositoryImpl.getPortletFileEntry(PortletFileRepositoryImpl.java:530)
        	at com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil.getPortletFileEntry(PortletFileRepositoryUtil.java:248)
        	at com.liferay.blogs.model.impl.BlogsEntryImpl.getCoverImageURL(BlogsEntryImpl.java:59)
        	at org.apache.jsp.blogs.view_005fentry_005fcontent_jsp._jspService(view_005fentry_005fcontent_jsp:645)
        	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
        	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
        	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
        	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:373)
        	at com.liferay.portal.osgi.web.servlet.jsp.compiler.internal.JspServlet.service(JspServlet.java:385)
        	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
        	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
        	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
        

        Attachments

          Activity

            People

            Assignee:
            joyce.wang Joyce Wang
            Reporter:
            ricardo.couso Ricardo Couso
            Participants of an Issue:
            Recent user:
            Jason Pince
            Engineering Assignee:
            Ricardo Couso
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              25 weeks, 5 days ago

                Packages

                Version Package
                7.0.0 DXP FP94
                7.0.X
                7.1.10 DXP FP18
                7.1.X
                7.2.10 DXP FP5
                7.2.10.2 DXP SP2
                7.2.X
                7.3.10 DXP GA1
                Master