joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.7k stars 3.63k forks source link

Warning: Attempt to read property "autostart" on null on GuidedTours.php on line 166 #43072

Closed xillibit closed 3 months ago

xillibit commented 4 months ago

Steps to reproduce the issue

Open the backend and you will get the error. I have xdebug activated so i can see it directly :

image

I have just done an update on my repo and like said here : https://github.com/joomla/joomla-cms/issues/43040 i have checked the table #__guidedtours it has already the column autostart. Under System -> Database, i have nothing to apply.

Expected result

No warning

Actual result

PHP Warning: Attempt to read property "autostart" on null in \joomla-cms-5.1-dev\plugins\system\guidedtours\src\Extension\GuidedTours.php on line 166 PHP Stack trace: PHP 1. {main}() \joomla-cms-5.1-dev\administrator\index.php:0 PHP 2. require_once() \joomla-cms-5.1-dev\administrator\index.php:32 [17-Mar-2024 14:43:35 UTC] PHP 3. Joomla\CMS\Application\CMSApplication->execute() \joomla-cms-5.1-dev\administrator\includes\app.php:58 PHP 4. Joomla\CMS\Application\AdministratorApplication->render() \joomla-cms-5.1-dev\libraries\src\Application\CMSApplication.php:311 PHP 5. Joomla\CMS\Application\CMSApplication->render() \joomla-cms-5.1-dev\libraries\src\Application\AdministratorApplication.php:434 PHP 6. Joomla\CMS\Document\HtmlDocument->render($caching = FALSE, $params = ['template' => 'atum', 'file' => 'cpanel.php', 'params' => class Joomla\Registry\Registry { protected $data = class stdClass { ... }; protected $initialized = TRUE; protected $separator = '.' }, 'csp_nonceC:\Users\flo\git\joomla-cms-5.1-dev\libraries\src\Application\CMSApplication.php:1073 PHP 7. Joomla\CMS\Document\HtmlDocument->_renderTemplate() \joomla-cms-5.1-dev\libraries\src\Document\HtmlDocument.php:647 PHP 8. Joomla\CMS\Document\HtmlDocument->getBuffer($type = 'metas', $name = NULL, $attribs = []) \joomla-cms-5.1-dev\libraries\src\Document\HtmlDocument.php:894 PHP 9. Joomla\CMS\Document\Renderer\Html\MetasRenderer->render($head = NULL, $params = [], $content = NULL) \joomla-cms-5.1-dev\libraries\src\Document\HtmlDocument.php:575 PHP 10. Joomla\Event\Dispatcher->dispatch($name = 'onBeforeCompileHead', $event = class Joomla\CMS\Event\Application\BeforeCompileHeadEvent { protected $name = 'onBeforeCompileHead'; protected $arguments = ['subject' => class Joomla\CMS\Application\AdministratorApplication { ... }, 'document' => class Joomla\CMS\Document\HtmlDocument { ... }]; protected $stopped = FALSE; private ${Joomla\CMS\Event\AbstractImmutableEvent}constructed = TRUE }) \joomla-cms-5.1-dev\libraries\src\Document\Renderer\Html\MetasRenderer.php:62 PHP 11. Joomla\Plugin\System\GuidedTours\Extension\GuidedTours->onBeforeCompileHead(class Joomla\CMS\Event\Application\BeforeCompileHeadEvent { protected $name = 'onBeforeCompileHead'; protected $arguments = ['subject' => class Joomla\CMS\Application\AdministratorApplication { ... }, 'document' => class Joomla\CMS\Document\HtmlDocument { ... }]; protected $stopped = FALSE; private ${Joomla\CMS\Event\AbstractImmutableEvent}constructed = TRUE }) \joomla-cms-5.1-dev\libraries\vendor\joomla\event\src\Dispatcher.php:454

System information (as much as possible)

Joomla: 5.1-beta2-dev Php : 8.2.17 MariaDB : 10.4.13

Additional comments

Quy commented 4 months ago

Fixed per #43031. Thanks.

xillibit commented 3 months ago

The issue is still here, i have updated my local git repo of 5.1-dev from today

image

Quy commented 3 months ago

@obuisard

obuisard commented 3 months ago

Hello Florian @xillibit, I tried a fresh 5.1 beta2 install and I cannot reproduce the issue. I have also tried the udpate. In which page did you encounter the error?

xillibit commented 3 months ago

I have deleted my local repo and downloaded from github and the error has disappeared now

Quy commented 3 months ago

PR #43139