Install Joomla 4.0.0 beta 1 and Testing Sample Data
Navigate on the frontend to Sample Sites
in the right hand menus
then Australian Parks
or Fruit Shop
in the content
No PHP errors - anything but a PHP error.
Argument 1 passed to Joomla\CMS\WebAsset\WebAssetRegistry::addExtensionRegistryFile() must be of the type string, null given, called in /application/libraries/src/Application/SiteApplication.php on line 173
PHP 7.4.6
Labels |
Added:
?
|
No I will not close this one as this is a PHP error, I'll try and replicate it another way, but ANYWAY Joomla should not be returning a PHP error.
Valid bug regardless of whether a reproducer can be supplied, in this case "just read the code" is the right answer.
https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Application/SiteApplication.php#L173 calls the registry's addExtensionRegistryFile
method, which expects a string value and does not support null. Through a series of questionable defaults, it is possible for $component
to be null, which can trigger this error. Why $component
is null in the request at this point (hard to say what point it's at without a stack trace) is concerning though.
The link points to a non-existing menu item. In J3 a 404 with Component not found
message is thrown.
well, that obviously a broken link index.php?Itemid=243
there should be 404 error,
I will do pull later to handle empty $component while addExtensionRegistryFile()
The call to addExtensionRegistryFile()
should be wrapped in $component
check instead. But, realistically, shouldn't the registry file be added when booting the component?
shouldn't the registry file be added when booting the component?
Need to keep order:
1 component registry file
2 template registry file
So template can override component assets.
hm, or maybe a good idea.
Split this code to 2 parts:
addExtensionRegistryFile($component)
move to component booting
addTemplateRegistryFile($template->template, $this->getClientId())
move to $app->render() or something
I try to check
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-06-09 15:14:24 |
Closed_By | ⇒ | Quy |
All the testing data is out of date. It is not shipped with Joomla. There is already an open issue for it #25777
Please close