Issue
- After installing the latest hotfix, we found that certain pages were deleted.
- How is that possible?
Environment
- DXP 7.0+
Resolution
Hotfixes contain fixes that change the Liferay source code
- Meaning that it does not touch anything else - especially the database. There are strict rules for our development team, fixes cannot touch the database. At the time of writing, we have never seen a case where a hotfix deleted anything in the database.
- In case the database entries need to be modified, we provide an additional Groovy script to delete or correct entries. This is also because there is a chance that the database has already been altered - so it is best to provide these kinds of scripts on a case-by-case basis.
- This is why pages could not have been deleted by a hotfix unless you received a special hotfix with additional comments that state that this will change some database entries.
- Nonetheless, we always suggest backing up your production database and bundle before installing hotfixes - just to be on the safe side, since it makes it easier to restore the previous state, should any issues arise during or after the hotfix installation.
- You can ask the support to check if there are any related fixes in your hotfix that may have affected the behavior of pages.
Additional Testing
If you think that the hotfix deleted a page, here are the next possible steps you can take:
-
Test the hotfix with a vanilla bundle of Liferay and a new database
- Setup a vanilla bundle on your patch level
- Start Liferay
- Create some pages, similar to the ones you think were deleted
- Install the hotfix
- Start Liferay again
- Check if the pages
-
Test the hotfix with a vanilla bundle of Liferay and your database dump
Repeat the previous steps (steps 1-6), but this time with a copy of your database.
-
Test the hotfix with your configuration of Liferay and your database dump
Try to configure everything as close to your existing configuration as possible.
Connect your database and test the previous steps (steps 1-6).
These tests should prove whether the hotfix deletes pages or not.
Other possible scenarios
So how could those pages be deleted?
We have 2 scenarios that can happen quite frequently:
- A user accidentally deleted them - it is possible because certain assets, such as pages can be deleted directly any manually on the Live site as well. Web Content articles work in a similar fashion.
-
A page was deleted in Staging, then this change was published to the Live site.
Before publishing your changes, make sure to check if the Replicate Individual Deletions option is checked. If it is, and certain pages were deleted in Staging, proceeding with the publishing will delete pages on the Live version.