svanschu / SchuWeb-Sitemap

SchuWeb Sitemap is a sitemap generator for Joomla CMS
GNU General Public License v3.0
13 stars 9 forks source link

Call to a member function getGroup() on null #97

Closed ghost closed 2 years ago

ghost commented 2 years ago

Steps to reproduce

Installed pkg_schuweb_sitemap_3.4.0_20210930_J4 in two independent Joomla 4 sites.

Expected behavior

Normal behavior.

Actual result

I get the following error when selecting the component:

Call to a member function getGroup() on null

System information Joomla version: Joomla! 4.0.3 Stable [ Furaha ] 12-September-2021 10:39 GMT SchuWeb-Sitemap version: 3.4.0_20210930_J4 PHP version: 8.0.11 Database version: 10.6.4-MariaDB-1:10.6.4+maria~bullseye

svanschu commented 2 years ago

Oh apparently I didn't test with PHP 8 yet. Thank you for report.

Regards

svanschu commented 2 years ago

@mikesmith500 could you be a little bit mor specific? What have you done, which button or link clicked?

I just setup a PHP 8.0.11 test environment and didn't get that error.

So I'm looking forward to more information to fix this issue for you.

ghost commented 2 years ago

The error comes out when I go into components / schuweb sitemap.

2021-10-03T10:11:17+00:00 CRITICAL error Uncaught Throwable of type Error thrown with message "Call to a member function getGroup() on null". Stack trace: #0 /home/public_html/libraries/src/Layout/FileLayout.php(128): include() 1 /home/public_html/libraries/src/Layout/FileLayout.php(643): Joomla\CMS\Layout\FileLayout->render() 2 /home/public_html/layouts/joomla/searchtools/default.php(94): Joomla\CMS\Layout\FileLayout->sublayout() 3 /home/public_html/libraries/src/Layout/FileLayout.php(128): include('...') 4 /home/public_html/libraries/src/Layout/LayoutHelper.php(73): Joomla\CMS\Layout\FileLayout->render() 5 /home/public_html/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default_j4.php(40): Joomla\CMS\Layout\LayoutHelper::render() 6 /home/public_html/libraries/src/MVC/View/HtmlView.php(429): include('...') 7 /home/public_html/administrator/components/com_schuweb_sitemap/views/sitemaps/tmpl/default.php(16): Joomla\CMS\MVC\View\HtmlView->loadTemplate() 8 /home/public_html/libraries/src/MVC/View/HtmlView.php(429): include('...') 9 /home/public_html/libraries/src/MVC/View/HtmlView.php(218): Joomla\CMS\MVC\View\HtmlView->loadTemplate() 10 /home/public_html/administrator/components/com_schuweb_sitemap/views/sitemaps/view.html.php(63): Joomla\CMS\MVC\View\HtmlView->display() 11 /home/public_html/administrator/components/com_schuweb_sitemap/controller.php(56): SchuWeb_SitemapViewSitemaps->display() 12 /home/public_html/libraries/src/MVC/Controller/BaseController.php(730): SchuWeb_SitemapController->display() 13 /home/public_html/administrator/components/com_schuweb_sitemap/schuweb_sitemap.php(24): Joomla\CMS\MVC\Controller\BaseController->execute() 14 /home/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(69): require_once('...') 15 /home/public_html/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() 16 /home/public_html/libraries/src/Component/ComponentHelper.php(389): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() 17 /home/public_html/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent() 18 /home/public_html/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch() 19 /home/public_html/libraries/src/Application/CMSApplication.php(278): Joomla\CMS\Application\AdministratorApplication->doExecute() 20 /home/public_html/administrator/includes/app.php(63): Joomla\CMS\Application\CMSApplication->execute() 21 /home/public_html/administrator/index.php(32): require_once('...')

svanschu commented 2 years ago

@mikesmith500 hey thank you, that was very helpfull. It seems it was a packaging issue. Please try this package pkg_schuweb_sitemap_3.4.0_20211004.zip and report if it fixes your problems, for me it does.

ghost commented 2 years ago

Everything is alright now.