Our Joomla! extensions are all OpenSource and free of charge. Support is also free of charge. Nevertheless, we do have costs that need to be paid. This is done out of our own pocket. We have had a donation button on our website for some time now, which is actually used to make donations from time to time. The donation progress bar is intended to show how much support we have received and how much is still missing to cover the basic costs, such as hosting and services. The annual costs currently amount to 420€.
2024: €235.49 out of the €356 target was reached
Thank you for your support!
You want to support and there is no suitable platform? Write to us in the forum.
I have now downloaded the current installation packages for J4 and J5 and looked at the 'HtmlDocument.php' file in the 'libraries/src/Document' directory.
In this file for J5[1] the method 'getToolbar()' exists
/**
* Returns a toolbar object or null
*
* @param string $toolbar
* @param boolean $create
*
* @return ?Toolbar
*
* @since 5.0.0
*/
public function getToolbar(string $toolbar = 'toolbar', bool $create = true): ?Toolbar
{
if (empty($this->toolbars[$toolbar])) {
if (!$create) {
return null;
}
$this->toolbars[$toolbar] = CmsFactory::getContainer()->get(ToolbarFactoryInterface::class)->createToolbar($toolbar);
}
return $this->toolbars[$toolbar];
}
It does NOT exist in the file for J4[2]! It also says (in the file for J5 see above) since 5.0.0.
My idea for this.
You have to check which Joomla version is present, perhaps already during the installation, in order to then install different files, or you do this in one and the same 'HtmlView.php', in the 'addToolbar()' method, whereby the use statement 'use Joomla\CMS\Toolbar\Toolbar;' would be redundant for J5.
Sadly needed to add a J4 J5 switch to be J6 compatible as well.
Hope there won't be more, so I can support J4-6 with one extension version.
Thx for report.
If you enjoy our extensions and found our assistance helpful, please consider supporting the project as outlined at the top of the page. Your support would be greatly appreciated.
If you enjoy our extensions and found our assistance helpful, please consider supporting the project as outlined at the top of the page. Your support would be greatly appreciated.