Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Bulk Republish of Web Content
Hi,
We have a requirement to add a new feature to a particular Web Content type, so we have added this to the freemarker template. Rather than go through each Web content item and republish them individually, is there a way to do a bulk re-publish of the web content? Using Liferay 7.1.3 GA4, MySQL 5.7
Thanks
Mashuk
We have a requirement to add a new feature to a particular Web Content type, so we have added this to the freemarker template. Rather than go through each Web content item and republish them individually, is there a way to do a bulk re-publish of the web content? Using Liferay 7.1.3 GA4, MySQL 5.7
Thanks
Mashuk
I am not sure why you need to republish them? Can't you check in the template if the field is there and if it isn't, do whatever makes sense? That's at least what we do when we add new fields to the structure.
In any case, republishing is not sufficient. The problem is that the frontend updates the content xml when it is saved and adds the new fields. So you have basically two options:
1) Open each one manually and save them
2) Use a script to fetch the relevant articles and update the xml content yourself. While this isn't recommended, the xml is pretty simple and you can use a manually saved content as an example.
In any case, republishing is not sufficient. The problem is that the frontend updates the content xml when it is saved and adds the new fields. So you have basically two options:
1) Open each one manually and save them
2) Use a script to fetch the relevant articles and update the xml content yourself. While this isn't recommended, the xml is pretty simple and you can use a manually saved content as an example.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™