<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Unable to search expired web content in the control panel</title>
  <link rel="self" href="https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120410191" />
  <subtitle>Unable to search expired web content in the control panel</subtitle>
  <id>https://uat.liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120410191</id>
  <updated>2026-10-15T11:16:40Z</updated>
  <dc:date>2026-10-15T11:16:40Z</dc:date>
  <entry>
    <title>RE: Unable to search expired web content in the control panel</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120424004" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120424004</id>
    <updated>2020-11-10T16:44:20Z</updated>
    <published>2020-11-10T16:43:37Z</published>
    <summary type="html">&lt;p&gt;A bug was filed here: &lt;a href="https://issues.liferay.com/browse/LPS-123299"&gt;https://issues.liferay.com/browse/LPS-123299&lt;/a&gt;&lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2020-11-10T16:43:37Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: Unable to search expired web content in the control panel</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120423882" />
    <author>
      <name>Russell Bohl</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120423882</id>
    <updated>2020-11-10T14:54:09Z</updated>
    <published>2020-11-10T14:54:09Z</published>
    <summary type="html">&lt;p&gt;Thanks for the report: I've shared your post and my attached GIF
  internally with the team who works on Web Content, and they're looking
  into it further.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;
  &lt;img src="/documents/14/120368684/expired-web-content_search.gif/32394699-1dbf-c33f-2c31-acdc09156e65?t=1605020035298&amp;amp;imagePreview=1" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Russell Bohl</dc:creator>
    <dc:date>2020-11-10T14:54:09Z</dc:date>
  </entry>
  <entry>
    <title>RE: Unable to search expired web content in the control panel</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120421437" />
    <author>
      <name>Darryl Kpizingui</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120421437</id>
    <updated>2020-11-09T08:56:46Z</updated>
    <published>2020-11-09T08:56:46Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I was able to create my override
  of&amp;nbsp;com.liferay.journal.web-4.0.21.jar. Now I can search and see my
  expired contents&lt;/p&gt;
&lt;p&gt;I&amp;nbsp; also find that there might be a flaw in the implementation of the
  method &lt;b&gt;JournalDisplayContext.buildSearchContext(...)&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;protected SearchContext buildSearchContext(int start, int end, boolean showVersions) {

		SearchContext searchContext = new SearchContext();

		searchContext.setAndSearch(false);
		searchContext.setAttribute("head", Boolean.TRUE);
		searchContext.setAttribute("latest", Boolean.TRUE);

		LinkedHashMap&amp;amp;lt;String, Object&amp;amp;gt; params;
		params  =	LinkedHashMapBuilder.&amp;amp;lt;String, Object&amp;amp;gt;put(
																"expandoAttributes", getKeywords()
															).put(
																"keywords", getKeywords()
															).build();

		searchContext.setAttribute("params", params);

		if (!showVersions) {
			searchContext.setAttribute("showNonindexable", Boolean.TRUE);
		}

		//Flaw??? searchContext.setAttributes replace all the previous attributes
		searchContext.setAttributes(
			HashMapBuilder.&amp;amp;lt;String, Serializable&amp;amp;gt;put(Field.ARTICLE_ID, getKeywords())
						  .put(Field.CLASS_NAME_ID, JournalArticleConstants.CLASS_NAME_ID_DEFAULT)
						  .put(Field.CONTENT, getKeywords())
						  .put(Field.DESCRIPTION, getKeywords())
						  .put(Field.STATUS, getStatus())
						  .put(Field.TITLE, getKeywords())
						  .put("params", params)
							.build());

		//..
	}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Darryl Kpizingui</dc:creator>
    <dc:date>2020-11-09T08:56:46Z</dc:date>
  </entry>
  <entry>
    <title>Unable to search expired web content in the control panel</title>
    <link rel="alternate" href="https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120410190" />
    <author>
      <name>Darryl Kpizingui</name>
    </author>
    <id>https://uat.liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120410190</id>
    <updated>2020-11-08T12:17:49Z</updated>
    <published>2020-11-08T12:17:49Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I did a migration from Liferay 6.2 to 7.3. The migration went well. I
  realised that it not not possible in Liferay 7.3 to search for expired
  or deprecated&amp;nbsp;web content in the administration.&lt;/p&gt;
&lt;p&gt;No web content is shown when a text is put in the search bar and the
  filter "With with expired version" is selected.&lt;/p&gt;
&lt;p&gt;Also the search is not working when the filter "Mine",
  "Recent" or "Structure" is selected. As the
  keyword typed in the search bar is not used to fetch the contents. I
  can find that code in the class&amp;nbsp;&lt;strong&gt;JournalDisplayContext.java in
    the project Journal-Web.&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;	private SearchContainer _getArticlesSearchContainer() throws PortalException {


		if (isNavigationMine() || isNavigationRecent()) {
			
			//Search keyword is not used here

			List results = JournalArticleServiceUtil.getGroupArticles(
				_themeDisplay.getScopeGroupId(), _themeDisplay.getUserId(),
				getFolderId(), getStatus(), includeOwner,
				articleSearchContainer.getStart(),
				articleSearchContainer.getEnd(),
				articleSearchContainer.getOrderByComparator());

			articleSearchContainer.setResults(results);
		}
		else if (Validator.isNotNull(getDDMStructureKey())) {

			//Search keyword is not used here

			List results = JournalArticleServiceUtil.getArticlesByStructureId(
				_themeDisplay.getScopeGroupId(), getDDMStructureKey(),
				getStatus(), articleSearchContainer.getStart(),
				articleSearchContainer.getEnd(),
				articleSearchContainer.getOrderByComparator());

			articleSearchContainer.setResults(results);
		}
		else if (isSearch()) {
			
			Indexer indexer = JournalSearcher.getInstance();

			/*
			* Here the Keyword is used for the search, but no expired content is retrieved
			*/
			SearchContext searchContext = buildSearchContext(
				folderIds, articleSearchContainer.getStart(),
				articleSearchContainer.getEnd(), sort, false);

			Hits hits = indexer.search(searchContext);
		}
		else {
		
			//Default when no keyworkd is used

			List results = JournalFolderServiceUtil.getFoldersAndArticles(
				_themeDisplay.getScopeGroupId(), 0, getFolderId(), getStatus(),
				_themeDisplay.getLocale(), articleSearchContainer.getStart(),
				articleSearchContainer.getEnd(), folderOrderByComparator);

			articleSearchContainer.setResults(results);
		}

		//...
	}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you know if is there a way I can eaily search for deprecated or
  expired web content? I was not able to find a config that can solve
  this issue.&lt;br&gt;I am trying to find a way to create a override jar,
  so the user of the portal can continue their work.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Darryl Kpizingui</dc:creator>
    <dc:date>2020-11-08T12:17:49Z</dc:date>
  </entry>
</feed>
