Legacy Knowledge Base
Published Jun. 30, 2025

How to find all the invalid references in Web Content and Blog entries?

Written By

Rita Schaff

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We want to check if there are invalid references in all our web content articles and blog entries. There is a possibility to check web content articles with the class ModelValidatorUtil using a Groovy script.
    com.liferay.portal.validation.ModelValidatorUtil.validate(journalarticle)
  • But there is no exception for invalid references with double dots like href="../somepath".

  • Is this a known bug?

  • And is there a possibility to find invalid references in all blog entries using a groovy script?

Environment

  • DXP 7.2

Resolution

  • This is a current product limitation
  • At the moment, we have no existing scripts that could look for invalid references in blog entries and web content articles - because these cases are handled on a case-by-case basis.
  • Web content articles are saved in an XML file where you can store various fields with various content. So checking for something requires a specific script tailored to the given web content article.
  • The following options are at your disposal for this use case:
  • Open a Feature Request that will be evaluated by our Product Team. 
    • This is our official process that will allow our Product Team to assess the request.
    • You can add your personal touch to the product by writing down the details in the description.
    • Feel free to add further comments to discuss the remaining details with the team.
    • Please note that the implementation of feature requests is subject to our developers' decision, and the new feature can only be added to our future Liferay releases.
  • Customization
    Modifying Liferay's source code and developing your own solution to fit your business needs are always available to you. Please note that doing so may result in limited support for bugs that originate from modifying the code.
  • Global Services Team
    Involve our Global Services team by reaching out to your Liferay representative.
Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base