From 0e207dea36c1a1eae82a5abd02179698b1005184 Mon Sep 17 00:00:00 2001 From: "daniel.solis" <2894221+dsolistorres@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:48:01 -0600 Subject: [PATCH 1/3] feat(PP) : remove bundle name column (#30424) Closes #28510 ### Proposed Changes * This pull request focuses on cleaning up the `view_publish_audit_list.jsp` file by removing unused imports and eliminating a column related to bundle names from the publish audit list table. Co-authored-by: erickgonzalez --- .../publishing/view_publish_audit_list.jsp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/publishing/view_publish_audit_list.jsp b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/publishing/view_publish_audit_list.jsp index 0d6e0a042d2f..ede9be40837a 100644 --- a/dotCMS/src/main/webapp/html/portlet/ext/contentlet/publishing/view_publish_audit_list.jsp +++ b/dotCMS/src/main/webapp/html/portlet/ext/contentlet/publishing/view_publish_audit_list.jsp @@ -1,28 +1,18 @@ <%@page import="org.apache.commons.lang.StringEscapeUtils"%> -<%@page import="com.dotcms.publisher.business.PublishAuditUtil"%> <%@page import="com.dotmarketing.beans.PermissionableProxy"%> -<%@page import="com.dotcms.publisher.business.PublishQueueElement"%> <%@page import="com.dotmarketing.business.PermissionAPI"%> <%@page import="com.dotmarketing.util.DateUtil"%> <%@page import="com.dotcms.publisher.business.PublishAuditAPI"%> <%@page import="com.dotcms.publisher.business.PublishAuditStatus"%> -<%@page import="com.dotmarketing.util.URLEncoder"%> -<%@page import="java.util.Date"%> <%@page import="com.dotmarketing.portlets.contentlet.business.ContentletAPI"%> <%@page import="java.util.ArrayList"%> -<%@page import="com.liferay.portal.model.User"%> -<%@page import="com.dotmarketing.business.web.WebAPILocator"%> -<%@page import="com.dotmarketing.portlets.contentlet.model.Contentlet"%> <%@page import="com.dotcms.publisher.business.DotPublisherException"%> -<%@page import="com.dotmarketing.business.DotStateException"%> <%@page import="java.util.Map"%> <%@page import="com.dotcms.publisher.business.PublisherAPI"%> <%@page import="java.util.List"%> <%@page import="com.dotmarketing.business.APILocator"%> -<%@page import="java.util.Calendar"%> <%@page import="com.dotmarketing.util.UtilMethods"%> <%@ page import="com.liferay.portal.language.LanguageUtil"%> -<%@ page import="com.dotcms.publisher.bundle.bean.Bundle"%> <%@ page import="java.util.stream.Collectors" %> <%@ page import="com.dotcms.publisher.business.PublishQueueElementTransformer" %> <%@ include file="/html/portlet/ext/contentlet/publishing/init.jsp" %> @@ -298,7 +288,6 @@ <%= LanguageUtil.get(pageContext, "publisher_Identifier") %> - <%= LanguageUtil.get(pageContext, "publisher_dialog_bundle_name") %> <%= LanguageUtil.get(pageContext, "Title") %> <%= LanguageUtil.get(pageContext, "publisher_Status") %> <%= LanguageUtil.get(pageContext, "publisher_Date_Entered") %> @@ -347,13 +336,6 @@ <%=shortBundleId.toString()%> - <%--BundleName--%> - - <% Bundle bundle = APILocator.getBundleAPI().getBundleById(c.getBundleId()); %> - <%if ( bundle != null && bundle.getName() != null && (!bundle.getName().equals( bundle.getId() ))) { %> - <%=bundle.getName()%> - <%}%> - <%--BundleTitle--%> <%try{ %> <% if(bundleAssets.keySet().size()>0){ %> From d5207688d5412f93327679a5b6d35ae83a3a0c73 Mon Sep 17 00:00:00 2001 From: Geronimo Ortiz Date: Wed, 23 Oct 2024 12:49:42 -0300 Subject: [PATCH 2/3] Issue 29238 Fix upload new files error in Tasks portlet (#30416) The [error](https://github.com/dotCMS/core/issues/29238#issuecomment-2392303924) mentioned already existed before the fix of the original issue. When uploading a file, the method made some checks to verify where was the request coming from. This check wasn't considering the case when it comes from the Task Detail tab (Attach File button), and it was trying to set a language attribute (_CONTENT_SELECTED_LANGUAGE_) that was only being set when we opened a contentlet before. So if we tried to upload a file from the Task Detail tab before that, it was throwing a null-caused exception. This was fixed by adding an extra check, if that attribute was null then set another one that is present in all the cases where this method is called. This way we won't get a case where it is null. Co-authored-by: erickgonzalez --- .../portlets/files/action/UploadMultipleFilesAction.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/files/action/UploadMultipleFilesAction.java b/dotCMS/src/main/java/com/dotmarketing/portlets/files/action/UploadMultipleFilesAction.java index ef53626ecd16..1b48672233f8 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/files/action/UploadMultipleFilesAction.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/files/action/UploadMultipleFilesAction.java @@ -239,7 +239,11 @@ public void _saveFileAsset(ActionRequest req, ActionResponse res,PortletConfig c final long defaultLanguageId = APILocator.getLanguageAPI().getDefaultLanguage().getId(); currentLang = searchedLangId == 0 ? defaultLanguageId : searchedLangId; } else { - currentLang = Long.parseLong(session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE).toString()); + if (session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE) != null) { + currentLang = Long.parseLong(session.getAttribute(WebKeys.CONTENT_SELECTED_LANGUAGE).toString()); + } else { + currentLang = Long.parseLong(session.getAttribute(WebKeys.HTMLPAGE_LANGUAGE).toString()); + } } if (currentLang != 0) { contentlet.setLanguageId(currentLang); From 8973f4f4cf9fce2fbd9e5bb6deddc0a386feaa5a Mon Sep 17 00:00:00 2001 From: Humberto Morera <31667212+hmoreras@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:09:01 -0600 Subject: [PATCH 3/3] implementation ( Content Analytics Search): #30231 Implement Search form and results. (#30434) ### Proposed Changes * correct route path. --- dotCMS/src/main/webapp/WEB-INF/messages/Language.properties | 2 +- dotCMS/src/main/webapp/WEB-INF/portlet.xml | 2 +- .../dotmarketing/business/portal/SerializationHelperTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties index ce7b9dd91d65..9f31355e46c9 100644 --- a/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties +++ b/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties @@ -704,7 +704,7 @@ com.dotcms.repackage.javax.portlet.title.pages=Pages com.dotcms.repackage.javax.portlet.title.landing-pages=Landing Pages com.dotcms.repackage.javax.portlet.title.dotai=dotAI com.dotcms.repackage.javax.portlet.title.locales=Locales -com.dotcms.repackage.javax.portlet.title.analytics_search=Analytics Search +com.dotcms.repackage.javax.portlet.title.analytics-search=Analytics Search com.dotcms.repackage.javax.app.title.edit-ema=Edit Mode Anywhere com.dotmarketing.business.UserAPI.delete.beginning=Deletion of user {0}: Started replacing user references in {1}. com.dotmarketing.business.UserAPI.delete.end=Deletion of user {0}: Finished replacing user references in {1}. diff --git a/dotCMS/src/main/webapp/WEB-INF/portlet.xml b/dotCMS/src/main/webapp/WEB-INF/portlet.xml index 52e15d2ee4ab..6facdadba9a0 100644 --- a/dotCMS/src/main/webapp/WEB-INF/portlet.xml +++ b/dotCMS/src/main/webapp/WEB-INF/portlet.xml @@ -501,7 +501,7 @@ - analytics_search + analytics-search Analytics Search com.dotcms.spring.portlet.PortletController diff --git a/dotCMS/src/test/java/com/dotmarketing/business/portal/SerializationHelperTest.java b/dotCMS/src/test/java/com/dotmarketing/business/portal/SerializationHelperTest.java index 5c496b2873e4..8fec066360f4 100644 --- a/dotCMS/src/test/java/com/dotmarketing/business/portal/SerializationHelperTest.java +++ b/dotCMS/src/test/java/com/dotmarketing/business/portal/SerializationHelperTest.java @@ -42,8 +42,8 @@ public void testFromXmlFile() throws IOException { portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("categories"))); assertTrue("PortletList should contain 'dotai' portlet", portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("dotai"))); - assertTrue("PortletList should contain 'analytics_search' portlet", - portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("analytics_search"))); + assertTrue("PortletList should contain 'analytics-search' portlet", + portletList.getPortlets().stream().anyMatch(p -> p.getPortletId().equals("analytics-search"))); // Check a specific portlet's details Optional categoriesPortlet = portletList.getPortlets().stream()