Skip to content

Commit 1cb2b4b

Browse files
authored
[6.0] Upmerges - 2025-11-05
Merge pull request #46408 from Bodge-IT/upmerges/2025-11-05
2 parents 84fe787 + 9b0f149 commit 1cb2b4b

File tree

10 files changed

+92
-39
lines changed

10 files changed

+92
-39
lines changed

.github/workflows/create-translation-pull-request-v5.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
with:
3232
ref: translation5
3333
fetch-depth: 0
34+
token: ${{ secrets.PAT_WORKFLOW }}
3435
- uses: actions/setup-node@v5
3536
with:
3637
node-version: 24

administrator/components/com_categories/src/Model/CategoryModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,7 @@ protected function cleanCache($group = null)
12311231
switch ($extension) {
12321232
case 'com_content':
12331233
parent::cleanCache('com_content');
1234+
parent::cleanCache('mod_articles');
12341235
parent::cleanCache('mod_articles_archive');
12351236
parent::cleanCache('mod_articles_categories');
12361237
parent::cleanCache('mod_articles_category');

administrator/components/com_content/src/Model/ArticleModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
10591059
protected function cleanCache($group = null)
10601060
{
10611061
parent::cleanCache('com_content');
1062+
parent::cleanCache('mod_articles');
10621063
parent::cleanCache('mod_articles_archive');
10631064
parent::cleanCache('mod_articles_categories');
10641065
parent::cleanCache('mod_articles_category');

administrator/components/com_fields/src/Model/FieldModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,7 @@ protected function cleanCache($group = null)
11251125
switch ($context) {
11261126
case 'com_content':
11271127
parent::cleanCache('com_content');
1128+
parent::cleanCache('mod_articles');
11281129
parent::cleanCache('mod_articles_archive');
11291130
parent::cleanCache('mod_articles_categories');
11301131
parent::cleanCache('mod_articles_category');

components/com_content/src/Model/ArticleModel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ public function storeVote($pk = 0, $rate = 0)
423423
protected function cleanCache($group = null)
424424
{
425425
parent::cleanCache('com_content');
426+
parent::cleanCache('mod_articles');
426427
parent::cleanCache('mod_articles_archive');
427428
parent::cleanCache('mod_articles_categories');
428429
parent::cleanCache('mod_articles_category');

libraries/src/Application/AdministratorApplication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ protected function doExecute()
193193
['option' => 'com_users', 'task' => 'user.edit'],
194194
['option' => 'com_users', 'task' => 'user.save'],
195195
['option' => 'com_users', 'task' => 'user.apply'],
196-
['option' => 'com_users', 'view' => 'captivate'],
196+
['option' => 'com_users', 'view' => 'captive'],
197+
['option' => 'com_users', 'task' => 'captive.validate'],
197198
['option' => 'com_login', 'task' => 'logout'],
198199
['option' => 'com_users', 'view' => 'methods'],
199200
['option' => 'com_users', 'view' => 'method'],

libraries/src/Exception/ExceptionHandler.php

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
namespace Joomla\CMS\Exception;
1111

1212
use Joomla\CMS\Application\CMSApplication;
13+
use Joomla\CMS\Application\Exception\NotAcceptable;
1314
use Joomla\CMS\Error\AbstractRenderer;
1415
use Joomla\CMS\Event\Application\AfterInitialiseDocumentEvent;
1516
use Joomla\CMS\Factory;
1617
use Joomla\CMS\Log\Log;
18+
use Joomla\CMS\Router\Exception\RouteNotFoundException;
19+
use Joomla\CMS\Uri\Uri;
1720

1821
// phpcs:disable PSR1.Files.SideEffects
1922
\defined('_JEXEC') or die;
@@ -221,18 +224,38 @@ protected static function isException($error)
221224
*/
222225
protected static function logException(\Throwable $error)
223226
{
227+
// Handle common client errors as notices instead of critical errors
228+
if ($error instanceof RouteNotFoundException) {
229+
$level = Log::NOTICE;
230+
$message = \sprintf(
231+
'Page not found (404): %s. Message: "%s"',
232+
Uri::getInstance()->toString(),
233+
$error->getMessage()
234+
);
235+
$category = 'client-error';
236+
} elseif ($error instanceof NotAcceptable) {
237+
$level = Log::NOTICE;
238+
$message = \sprintf(
239+
'Not acceptable (406): %s. Message: "%s"',
240+
Uri::getInstance()->toString(),
241+
$error->getMessage()
242+
);
243+
$category = 'client-error';
244+
} else {
245+
// For all other errors, log a critical error with the full stack trace.
246+
$level = Log::CRITICAL;
247+
$message = \sprintf(
248+
'Uncaught Throwable of type %1$s thrown with message "%2$s". Stack trace: %3$s',
249+
\get_class($error),
250+
$error->getMessage(),
251+
$error->getTraceAsString()
252+
);
253+
$category = 'error';
254+
}
255+
224256
// Try to log the error, but don't let the logging cause a fatal error
225257
try {
226-
Log::add(
227-
\sprintf(
228-
'Uncaught Throwable of type %1$s thrown with message "%2$s". Stack trace: %3$s',
229-
\get_class($error),
230-
$error->getMessage(),
231-
$error->getTraceAsString()
232-
),
233-
Log::CRITICAL,
234-
'error'
235-
);
258+
Log::add($message, $level, $category);
236259
} catch (\Throwable) {
237260
// Logging failed, don't make a stink about it though
238261
}

modules/mod_articles/mod_articles.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@
648648
>
649649
<option value="a.ordering">MOD_ARTICLES_OPTION_ORDERING_VALUE</option>
650650
<option value="fp.ordering">MOD_ARTICLES_OPTION_ORDERINGFEATURED_VALUE</option>
651-
<option value="a.hits" requires="hits">MOD_ARTICLES_OPTION_HITS_VALUE</option>
652651
<option value="a.title">JGLOBAL_TITLE</option>
653652
<option value="a.id">MOD_ARTICLES_OPTION_ID_VALUE</option>
654653
<option value="a.alias">JFIELD_ALIAS_LABEL</option>
@@ -657,6 +656,7 @@
657656
<option value="publish_up">MOD_ARTICLES_OPTION_STARTPUBLISHING_VALUE</option>
658657
<option value="a.publish_down">MOD_ARTICLES_OPTION_FINISHPUBLISHING_VALUE</option>
659658
<option value="random">MOD_ARTICLES_OPTION_RANDOM_VALUE</option>
659+
<option value="a.hits" requires="hits">MOD_ARTICLES_OPTION_HITS_VALUE</option>
660660
<option value="rating_count" requires="vote">MOD_ARTICLES_OPTION_VOTE_VALUE</option>
661661
<option value="rating" requires="vote">MOD_ARTICLES_OPTION_RATING_VALUE</option>
662662
</field>

package-lock.json

Lines changed: 50 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"jasmine-core": "^5.10.0",
110110
"joomla-cypress": "^1.3.1",
111111
"lightningcss": "^1.30.1",
112-
"mysql2": "^2.3.3",
112+
"mysql2": "^3.15.3",
113113
"pg": "^8.16.3",
114114
"postcss-scss": "^4.0.9",
115115
"recursive-readdir": "^2.2.3",

0 commit comments

Comments
 (0)