From 07727db35ca562a4bc23069b9820abb420f438ff Mon Sep 17 00:00:00 2001 From: Tuan Pham Ngoc Date: Thu, 12 May 2022 21:43:07 +0700 Subject: [PATCH 01/12] Fix nested items re-ordering (#37781) --- build/media_source/system/js/draggable.es6.js | 1 + 1 file changed, 1 insertion(+) diff --git a/build/media_source/system/js/draggable.es6.js b/build/media_source/system/js/draggable.es6.js index 4eb7ab3e0a693..8d8a17cf954e0 100644 --- a/build/media_source/system/js/draggable.es6.js +++ b/build/media_source/system/js/draggable.es6.js @@ -43,6 +43,7 @@ if (container) { // Get the form data formData = new FormData(form); formData.delete('task'); + formData.delete('order[]'); // IOS 10 BUG document.addEventListener('touchstart', () => {}, false); From ba23188bd9602ff4e98eb31a84068eac174add43 Mon Sep 17 00:00:00 2001 From: George Wilson Date: Thu, 12 May 2022 16:57:08 +0100 Subject: [PATCH 02/12] Fix dependency on web application stopping content from booting (#36568) --- .../src/Extension/ContactComponent.php | 2 +- .../com_contact/src/Service/HTML/Icon.php | 21 ---------------- .../src/Extension/ContentComponent.php | 2 +- .../com_content/src/Service/HTML/Icon.php | 25 ++----------------- 4 files changed, 4 insertions(+), 46 deletions(-) diff --git a/administrator/components/com_contact/src/Extension/ContactComponent.php b/administrator/components/com_contact/src/Extension/ContactComponent.php index 8c434eee52afc..3bcf27efc4f30 100644 --- a/administrator/components/com_contact/src/Extension/ContactComponent.php +++ b/administrator/components/com_contact/src/Extension/ContactComponent.php @@ -64,7 +64,7 @@ class ContactComponent extends MVCComponent implements public function boot(ContainerInterface $container) { $this->getRegistry()->register('contactadministrator', new AdministratorService); - $this->getRegistry()->register('contacticon', new Icon($container->get(SiteApplication::class))); + $this->getRegistry()->register('contacticon', new Icon); } /** diff --git a/administrator/components/com_contact/src/Service/HTML/Icon.php b/administrator/components/com_contact/src/Service/HTML/Icon.php index 075b7d3edca7d..e826cdcc77978 100644 --- a/administrator/components/com_contact/src/Service/HTML/Icon.php +++ b/administrator/components/com_contact/src/Service/HTML/Icon.php @@ -28,27 +28,6 @@ */ class Icon { - /** - * The application - * - * @var CMSApplication - * - * @since 4.0.0 - */ - private $application; - - /** - * Service constructor - * - * @param CMSApplication $application The application - * - * @since 4.0.0 - */ - public function __construct(CMSApplication $application) - { - $this->application = $application; - } - /** * Method to generate a link to the create item page for the given category * diff --git a/administrator/components/com_content/src/Extension/ContentComponent.php b/administrator/components/com_content/src/Extension/ContentComponent.php index 84780cc8ec041..3d2a03733eab8 100644 --- a/administrator/components/com_content/src/Extension/ContentComponent.php +++ b/administrator/components/com_content/src/Extension/ContentComponent.php @@ -115,7 +115,7 @@ class ContentComponent extends MVCComponent implements public function boot(ContainerInterface $container) { $this->getRegistry()->register('contentadministrator', new AdministratorService); - $this->getRegistry()->register('contenticon', new Icon($container->get(SiteApplication::class))); + $this->getRegistry()->register('contenticon', new Icon); // The layout joomla.content.icons does need a general icon service $this->getRegistry()->register('icon', $this->getRegistry()->getService('contenticon')); diff --git a/administrator/components/com_content/src/Service/HTML/Icon.php b/administrator/components/com_content/src/Service/HTML/Icon.php index 02bb41726ba22..b70cbaf279d4d 100644 --- a/administrator/components/com_content/src/Service/HTML/Icon.php +++ b/administrator/components/com_content/src/Service/HTML/Icon.php @@ -29,27 +29,6 @@ */ class Icon { - /** - * The application - * - * @var CMSApplication - * - * @since 4.0.0 - */ - private $application; - - /** - * Service constructor - * - * @param CMSApplication $application The application - * - * @since 4.0.0 - */ - public function __construct(CMSApplication $application) - { - $this->application = $application; - } - /** * Method to generate a link to the create item page for the given category * @@ -115,13 +94,13 @@ public function edit($article, $params, $attribs = array(), $legacy = false) // Ignore if in a popup window. if ($params && $params->get('popup')) { - return; + return ''; } // Ignore if the state is negative (trashed). if (!in_array($article->state, [Workflow::CONDITION_UNPUBLISHED, Workflow::CONDITION_PUBLISHED])) { - return; + return ''; } // Show checked_out icon if the article is checked out by a different user From 5ce0372b50ed0beeb6d679e079c7e50864b2772d Mon Sep 17 00:00:00 2001 From: Nicola Galgano Date: Fri, 13 May 2022 09:17:46 +0200 Subject: [PATCH 03/12] [4][scheduler] sort by last run (#37501) * sort by last run * lang * oops * lowercase --- administrator/components/com_scheduler/forms/filter_tasks.xml | 2 ++ administrator/components/com_scheduler/tmpl/tasks/default.php | 2 +- administrator/language/en-GB/com_scheduler.ini | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_scheduler/forms/filter_tasks.xml b/administrator/components/com_scheduler/forms/filter_tasks.xml index 893a0b432cc8f..fa34a07e8b0ae 100644 --- a/administrator/components/com_scheduler/forms/filter_tasks.xml +++ b/administrator/components/com_scheduler/forms/filter_tasks.xml @@ -58,6 +58,8 @@ + + diff --git a/administrator/components/com_scheduler/tmpl/tasks/default.php b/administrator/components/com_scheduler/tmpl/tasks/default.php index ec377f9dc30af..927d48839012b 100644 --- a/administrator/components/com_scheduler/tmpl/tasks/default.php +++ b/administrator/components/com_scheduler/tmpl/tasks/default.php @@ -129,7 +129,7 @@ class="visually-hidden"> - + diff --git a/administrator/language/en-GB/com_scheduler.ini b/administrator/language/en-GB/com_scheduler.ini index 4b4a87817972a..40fa725d8eea1 100644 --- a/administrator/language/en-GB/com_scheduler.ini +++ b/administrator/language/en-GB/com_scheduler.ini @@ -77,7 +77,9 @@ COM_SCHEDULER_LABEL_TASK_PRIORITY_LOW="Low" COM_SCHEDULER_LABEL_TASK_PRIORITY_NORMAL="Normal" COM_SCHEDULER_LABEL_TIMES_EXEC="Times Executed" COM_SCHEDULER_LABEL_TIMES_FAIL="Times Failed" +COM_SCHEDULER_LAST_RUN_ASC="Last Run ascending" COM_SCHEDULER_LAST_RUN_DATE="Last Run Date" +COM_SCHEDULER_LAST_RUN_DESC="Last Run descending" COM_SCHEDULER_MANAGER_TASKS="Scheduled Tasks" COM_SCHEDULER_MANAGER_TASK_EDIT="Edit Task" COM_SCHEDULER_MANAGER_TASK_NEW="New Task" From 80d2004e11ae0c0520da3622336d703cab525636 Mon Sep 17 00:00:00 2001 From: Peter Martin Date: Fri, 13 May 2022 10:04:17 +0200 Subject: [PATCH 04/12] [4.1] Language string not parsed (#37665) --- .../components/com_scheduler/src/Scheduler/Scheduler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/administrator/components/com_scheduler/src/Scheduler/Scheduler.php b/administrator/components/com_scheduler/src/Scheduler/Scheduler.php index 30ebfd4469bb8..ea1c68f8dc4f3 100644 --- a/administrator/components/com_scheduler/src/Scheduler/Scheduler.php +++ b/administrator/components/com_scheduler/src/Scheduler/Scheduler.php @@ -246,7 +246,7 @@ public function getTask(array $options = []): ?Task if (!isset($model)) { - throw new \RuntimeException('JLIB_APPLICATION_ERROR_MODEL_CREATE'); + throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE')); } $task = $model->getTask($options); @@ -327,7 +327,7 @@ public function fetchTaskRecords(array $filters, array $listConfig): array if (!$model) { - throw new \RuntimeException('JLIB_APPLICATION_ERROR_MODEL_CREATE'); + throw new \RuntimeException(Text::_('JLIB_APPLICATION_ERROR_MODEL_CREATE')); } $model->setState('list.select', 'a.*'); From 0ed11a05481ca9d92d3b247b8876b6634ecf800b Mon Sep 17 00:00:00 2001 From: Crystal Dionysopoulos <9141288+crystalenka@users.noreply.github.com> Date: Fri, 13 May 2022 14:27:33 +0300 Subject: [PATCH 05/12] [4.1] Making Google happy about breadcrumbs again. (#37679) * Making google happy with breadcrumbs again. * Fixing current page breadcrumb JSON Per https://developers.google.com/search/docs/advanced/structured-data/breadcrumb#list-item: "If the breadcrumb is the last item in the breadcrumb trail, item is not required. If item isn't included for the last item, Google uses the URL of the containing page." * Apply suggestions from code review Thank you, and apologies! I don't usually dig into the PHP; I'll double check the code style next time. Co-authored-by: Richard Fath * Update modules/mod_breadcrumbs/tmpl/default.php Co-authored-by: Richard Fath * Removing unnecessary ternary operator * Removing leftover microdata --- modules/mod_breadcrumbs/tmpl/default.php | 34 +++++++++++++++++------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/modules/mod_breadcrumbs/tmpl/default.php b/modules/mod_breadcrumbs/tmpl/default.php index 710874ba2ff5a..9c6e78ab12a6a 100644 --- a/modules/mod_breadcrumbs/tmpl/default.php +++ b/modules/mod_breadcrumbs/tmpl/default.php @@ -17,7 +17,7 @@ ?>