legacy-knowledge-base
公開されました Jun. 30, 2025

ウェブコンテンツを別のフォルダに移動すると、ウェブコンテンツの更新日が更新されます。

written-by

Rafael Regner

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

learn-legacy-article-disclaimer-text

問題

  • ウェブコンテンツをフォルダから別のフォルダに移動すると、ウェブコンテンツのすべてのバージョンの更新日が更新されます。
  • これは想定内の行動なのか?

Environment

  • Liferay DXP 7.2
  • Liferay DXP 7.3

解決策

  • ウェブコンテンツを別のフォルダに移動する場合、すべてのバージョンの更新日が更新されることが予想されます。
  • コードでわかるように、記事を移動するとき、この記事のすべてのバージョンは回復され、その後、新しい folderId と新しい treePath の両方が更新されます:
    List<JournalArticle> articles = journalArticlePersistence.findByG_A(
    groupId, articleId);

    String treePath = null;

    for (JournalArticle article : articles) {
    article.setFolderId(newFolderId);

    if (treePath == null) {
    treePath = article.buildTreePath();
    }

    article.setTreePath(treePath);

    journalArticlePersistence.update(article);
    }
  • このルート更新が、すべてのバージョンで修正日更新の原因となる。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base