since the merge of #48030
if for some reason you do not have a $secret in your configuration.php
0 Joomla\Component\Content\Administrator\Service\PreviewTokenService::__construct(): Argument #1 ($secret) must be of type string, null given, called in C:\repos\j62\administrator\components\com_content\src\View\Article\HtmlView.php on line 97
| Function | Location
-- | -- | --
1 | () | JROOT\administrator\components\com_content\src\Service\PreviewTokenService.php:45
2 | Joomla\Component\Content\Administrator\Service\PreviewTokenService->__construct() | JROOT\administrator\components\com_content\src\View\Article\HtmlView.php:97
3 | Joomla\Component\Content\Administrator\View\Article\HtmlView->initializeView() | JROOT\libraries\src\MVC\View\FormView.php:179
4 | Joomla\CMS\MVC\View\FormView->display() | JROOT\libraries\src\MVC\Controller\BaseController.php:705
5 | Joomla\CMS\MVC\Controller\BaseController->display() | JROOT\administrator\components\com_content\src\Controller\DisplayController.php:70
6 | Joomla\Component\Content\Administrator\Controller\DisplayController->display() | JROOT\libraries\src\MVC\Controller\BaseController.php:738
7 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT\libraries\src\Dispatcher\ComponentDispatcher.php:143
8 | Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() | JROOT\libraries\src\Component\ComponentHelper.php:361
9 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\AdministratorApplication.php:150
10 | Joomla\CMS\Application\AdministratorApplication->dispatch() | JROOT\libraries\src\Application\AdministratorApplication.php:206
11 | Joomla\CMS\Application\AdministratorApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:320
12 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\administrator\includes\app.php:58
13 | require_once() | JROOT\administrator\index.php:32
6.2
No response
No response
No response
No response
| Labels |
Added:
bug
|
||
| Labels |
Added:
No Code Attached Yet
|
||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-08-18 17:29:50 |
| Closed_By | ⇒ | brianteeman |
Look like the on your site, $secret is lost in configuration.php (which should not under normal condition) and it causes the issue. Will need to check to see what we should do to prevent error for this special case.
| Status | Closed | ⇒ | New |
| Closed_Date | 2026-08-18 17:29:50 | ⇒ | |
| Closed_By | brianteeman | ⇒ |
yes that is exactly what happened. I remembered too late that I had removed the $secret from configuration.php when I was writing this PR #48198
Up until this PR not having a $secret only caused a problem when you tried to create an api key.
Not having a $secret is something I came across on a client site that I believe was created from a hosting providers only installer. For the specific error I was addressing in #48198 I found a few similar reports so its obviously not a one off situation.
So I am reopening this (with an updated first post) as I believe it is something we should be able to give a specific error message for that is more helpful than the current bug display as shown in the first post.
@joomdonation had a go at a draft pr for this #48275
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-11-03 23:03:23 |
| Closed_By | ⇒ | brianteeman |
closing since 48030 was reverted
closing for now as I cant reproduce it on a clean install