Details

      Description

      Description:
      After exporting and importing a web content with a date field, the date changes by one day when displayed on a web content display portlet on a page.
      This seems to be caused by the content being created on JVM time zone GMT and then imported into JVM EST.

      Steps to Reproduce:
      1. Set computer OS time zone to EST. Unzip two 6.2 bundles (export and import bundles) with no hotfixes installed, change JVM of export bundle to GMT and JVM of import bundle to EST.
      2. In the export bundle (GMT) with no hotfix installed, create a web content structure and template that includes a date field.
      3. Using the structure and template, create a web content, set the date to 01/01/16.
      4. Export a LAR of the web contents.
      5. Import into import bundle (EST), confirm that the correct date shows up in Control Panel 01/01/16
      6. But the content actually displays an incorrect date 12/31/15.

      One issue I ran into is that I was unable to display the web content on a page because after importing the web content, the status of the web content was stuck on Scheduled. Ever attempt to publish the content fails, so I could not display the content. However, by clicking "Basic Preview" I was able to see what the content would look like displayed and the incorrect date (31 December 2015) was used.

      Results of Testing:
      Expected Results: Imported Web content displays selected date (01/01/16)
      Actual Results: Imported Web content displays a day off (12/31/15)

      Error Log:
      Logs from branch

      15:14:39,628 ERROR [liferay/background_task-2][BackgroundTaskMessageListener:133] Unable to execute background task
      com.liferay.portal.kernel.exception.SystemException: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:251)
              at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4483)
              at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4346)
              at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructureUtil.findByG_P(DDMStructureUtil.java:1419)
              at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.getDescendantDDMStructureIds(StagingIndexingBackgroundTaskExecutor.java:288)
              at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.getDescendantDDMStructureIds(StagingIndexingBackgroundTaskExecutor.java:306)
              at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.reindexDDMStructures(StagingIndexingBackgroundTaskExecutor.java:197)
              at com.liferay.portal.lar.backgroundtask.StagingIndexingBackgroundTaskExecutor.execute(StagingIndexingBackgroundTaskExecutor.java:122)
              at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:57)
              at com.liferay.portal.backgroundtask.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:108)
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
              at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
              at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
              at com.liferay.portal.dao.orm.hibernate.SessionFactoryImpl.openSession(SessionFactoryImpl.java:89)
              at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.openSession(BasePersistenceImpl.java:238)
              at com.liferay.portlet.dynamicdatamapping.service.persistence.DDMStructurePersistenceImpl.findByG_P(DDMStructurePersistenceImpl.java:4453)
              ... 14 more

      Reproduced in?
      Master? No, did not reproduce in master. Correct date displayed in web content display portlet (01 January 2016)
      Git ID: fc56db963c928e136738da749efb4ccb28485f2f
      Branch? Yes, reproduced in branch. When displaying web content in web content display portlet on page, the incorrect date (31 December 2015) is displayed.
      Git ID: a0271cfefb983d07c067df46a7685e419507dbfa

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 16 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.1.X
                  Master