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

Asset Publisher not hiding when no results in manual configuration

    Details

      Description

      While an empty asset publisher is hiding correctly in dynamic mode (as opposed to LPS-24518), the portlet is still visible if it's configured to show a manual list.

      Steps:
      1. Create an asset publisher on any page
      2. Configure it to be dynamic, with a filter rule, that leads to no results
      3. Create an user without update permission on that page, but view permissions on the page and the asset publisher
      4. Check the page with admin user and the created user

      While the admin user will see the portlet with the text "no results", the user will not see the portlet at all. So far it's correct.

      5. Now configure the asset publisher to show a manual list but don't choose any file

      Both admin and normal user will see the portlet which does show completely nothing.

      I didn't test current 6.2 builds but it's possible the bug is there too, because the code looks still almost the same.

      I found this: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/asset_publisher/view_dynamic_list.jspf#L237,L256

      If you reuse these lines here, it will work as expected again: https://github.com/liferay/liferay-portal/blob/master/portal-web/docroot/html/portlet/asset_publisher/view_manual.jspf#L100

      If this is no issue in 6.2 anymore, you will at least have to add the same code here: https://github.com/liferay/liferay-portal/blob/6.1.x/portal-web/docroot/html/portlet/asset_publisher/view_manual.jspf#L92

      I've tested it with a hook on my 6.1.20 EE GA2 installation.

        Attachments

        1. 35281-master-admin-dynamic.PNG
          35281-master-admin-dynamic.PNG
          70 kB
        2. 35281-master-admin-manual.PNG
          35281-master-admin-manual.PNG
          69 kB
        3. 35281-master-AP config dynamic.PNG
          35281-master-AP config dynamic.PNG
          74 kB
        4. 35281-master-AP config manual.PNG
          35281-master-AP config manual.PNG
          75 kB
        5. 35281-master-created user-dynamic.PNG
          35281-master-created user-dynamic.PNG
          67 kB
        6. 35281-master-created user-manual.PNG
          35281-master-created user-manual.PNG
          66 kB
        7. fixed-35281-ee-6.2.x-admin.PNG
          fixed-35281-ee-6.2.x-admin.PNG
          70 kB
        8. fixed-35281-ee-6.2.x-test1.PNG
          fixed-35281-ee-6.2.x-test1.PNG
          72 kB
        9. fixed-35281-master-admin.PNG
          fixed-35281-master-admin.PNG
          86 kB
        10. fixed-35281-master-test1.PNG
          fixed-35281-master-test1.PNG
          78 kB
        11. fixed-35281-step2.PNG
          fixed-35281-step2.PNG
          69 kB
        12. master-liferay.2015-08-03.log
          467 kB
        13. validate-35281-6.1.x-AP-AP display checked by admin.PNG
          validate-35281-6.1.x-AP-AP display checked by admin.PNG
          116 kB
        14. validate-35281-6.1.x-AP-AP display checked by admin-manual list.PNG
          validate-35281-6.1.x-AP-AP display checked by admin-manual list.PNG
          121 kB
        15. validate-35281-6.1.x-AP-AP display checked by created new user.PNG
          validate-35281-6.1.x-AP-AP display checked by created new user.PNG
          64 kB
        16. validate-35281-6.1.x-AP-AP display checked by created new user-manual list.PNG
          validate-35281-6.1.x-AP-AP display checked by created new user-manual list.PNG
          68 kB
        17. validate-35281-61 GA3 SP4-AP-AP display checked by admin.PNG
          validate-35281-61 GA3 SP4-AP-AP display checked by admin.PNG
          76 kB
        18. validate-35281-61 GA3 SP4-AP-AP display checked by admin-manual list.PNG
          validate-35281-61 GA3 SP4-AP-AP display checked by admin-manual list.PNG
          71 kB
        19. validate-35281-61 GA3 SP4-AP-AP display checked by created new user.PNG
          validate-35281-61 GA3 SP4-AP-AP display checked by created new user.PNG
          59 kB
        20. validate-35281-61 GA3 SP4-AP-AP display checked by created new user-manual list.PNG
          validate-35281-61 GA3 SP4-AP-AP display checked by created new user-manual list.PNG
          61 kB
        21. validate-35281-master-AP-AP display checked by admin-1.PNG
          validate-35281-master-AP-AP display checked by admin-1.PNG
          70 kB
        22. validate-35281-master-AP-AP display checked by admin-2.PNG
          validate-35281-master-AP-AP display checked by admin-2.PNG
          65 kB
        23. validate-35281-master-AP-AP display checked by admin-manual list-1.PNG
          validate-35281-master-AP-AP display checked by admin-manual list-1.PNG
          69 kB
        24. validate-35281-master-AP-AP display checked by admin-manual list-2.PNG
          validate-35281-master-AP-AP display checked by admin-manual list-2.PNG
          65 kB
        25. validate-35281-master-AP-AP display checked by created new user.PNG
          validate-35281-master-AP-AP display checked by created new user.PNG
          63 kB
        26. validate-35281-master-AP-AP display checked by created new user-manual list.PNG
          validate-35281-master-AP-AP display checked by created new user-manual list.PNG
          61 kB

          Issue Links

            Activity

              People

              Assignee:
              sherry.zhu Sherry Zhu (Inactive)
              Reporter:
              mod David Kubitza
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 7 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M7