RE: Bulk Republish of Web Content

Mashuk Choudhury, modified 5 Years ago. Junior Member Posts: 33 Join Date: 1/31/14 Recent Posts
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
thumbnail
Christoph Rabel, modified 5 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts
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.