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

After portlet removal, Calendar is not destroying a javascript poller code that requests current time to server once per minute

    Details

      Description

      After portlet removal, Calendar is not destroying a javascript poller code that requests current time to server once per minute

      The code that request the time to server was added in LPS-65412

      This issue is also reproduced in case of having SPA enabled and moving from a page with a calendar to other page without any calendar. The requests that get current time from server will be executed without having calendar and a warning trace will be written to liferay log

      Steps to reproduce

      1. Create a new page
      2. Install Calendar in new page
      3. Open it in "Day" or "Week" view
      4. Stay in the new page and open browser "Developer tools" => "Network" tab
      5. Wait two or three minutes
      6. You will view a request to following URL once a minute
        /c/portal/layout?p_l_id={PLID}&p_p_cacheability=cacheLevelPage&p_p_id=com_liferay_calendar_web_portlet_CalendarPortlet_INSTANCE_xxxxxxxxxxxx&p_p_lifecycle=2&p_p_resource_id=currentTime
        
      7. That requests are also written in tomcat log file localhost_access_log.2017-xx-xx.txt
      8. Remove Calendar from page
      9. Wait two or three minutes
      10. Open browser "Developer tools" => "Network" tab and check again the requests to /c/portal/layout
        • Expected behavior: No requests to /c/portal/layout are done after removing Calendar portlet. No warnings are written to liferay log
        • Wrong behavior: Requests to /c/portal/layout are done after removing Calendar portlet and they return error "400 bad request". A warning is written to liferay log for each request
          2017-12-16 07:54:05.054 WARN  [http-nio-9080-exec-5][SecurityPortletContainerWrapper:408] Reject serveResource for /c/portal/layout on com_liferay_calendar_web_portlet_CalendarPortlet_INSTANCE_IRFANkP9ogmH
          
      11. You can also check the requests in localhost_access_log.2017-xx-xx.txt file

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lori.liu Lori Liu (Inactive)
              Reporter:
              jorge.diaz Jorge Diaz
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

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

                  Packages

                  Version Package
                  7.0.0 DXP FP36
                  7.0.0 DXP SP7
                  7.0.5 CE GA6
                  7.0.X
                  7.1.0 M1
                  7.1.X
                  Master