Details

    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.1 CE GA2
    • Fix Version/s: None
    • Labels:
      None

      Description

      I managed to reproduce the problem in 6.2.x with the following steps:
      1. Deploy resources-importer-web from plugins-ee repository
      2. Deploy test-resources-importer-portlet from plugins-ee repository
      3. Go to http://localhost:8080/web/test-resources-importer-portlet/home
      4. In test-resources-importer-portlet add the following line to liferay-plugin-package.properties.

      resources-importer-developer-mode-enabled=true
      

      5. Redeploy test-resources-importer-portlet and refresh the Welcome page
      resources-importer-developer-mode-enabled=true property will result in deleting and recreating the contents.
      The problem is that the cache related to Web Contents are not cleared, because the resources-importer-web plugin sets the following flags:
      ResourcesImporterHotDeployMessageListener.java:

      ExportImportThreadLocal.setLayoutImportInProcess(true);
      			ExportImportThreadLocal.setPortletImportInProcess(true);
      

      This way the cache won't be cleared, JournalContentImpl.java:

      	@Override
      	public void clearCache() {
      		if (ExportImportThreadLocal.isImportInProcess()) {
      			return;
      		}
      
      		portalCache.removeAll();
      	}
      

      I checked how it works with the export/import framework, there are explicit calls to clear the caches, PortletImporter.java

      	public void importPortletInfo(
      			long userId, long plid, long groupId, String portletId,
      			Map<String, String[]> parameterMap, File file)
      		throws Exception {
      
      		try {
      			ExportImportThreadLocal.setPortletImportInProcess(true);
      
      			doImportPortletInfo(
      				userId, plid, groupId, portletId, parameterMap, file);
      		}
      		finally {
      			ExportImportThreadLocal.setPortletImportInProcess(false);
      
      			CacheUtil.clearCache();
      			JournalContentUtil.clearCache();
      			PermissionCacheUtil.clearCache();
      		}
      	}
      

      On master: test-resources-importer-portlet is not deployable, so I was unable to properly test, it seems affected, the resources-importer-web has been moved to it's own export-import-resources-importer module in liferay-portal

        Attachments

          Activity

            People

            • Assignee:
              lu.liu Lu Liu
              Reporter:
              zsolt.olah Zsolt Oláh (Inactive)
              Participants of an Issue:
              Recent user:
              Lu Liu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                38 weeks, 4 days ago