Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.6 + 1.7: Exception: Grav\Framework\Session\Messages #3136

Closed
pamtbaau opened this issue Jan 7, 2021 · 4 comments
Closed

1.6 + 1.7: Exception: Grav\Framework\Session\Messages #3136

pamtbaau opened this issue Jan 7, 2021 · 4 comments

Comments

@pamtbaau
Copy link
Contributor

pamtbaau commented Jan 7, 2021

TLDR:

Config:

  • Windows 10 + WSL/Ubuntu 20.04
  • Path Grav installation: /path/to/grav/site-dev
  • Defined hosts: dev-dev + dev-prod
  • Apache: Virtual hosts/server names: 'dev-dev' + 'dev-prod'
    • Both pointing to folder /path/to/grav/site-dev
  • Site accessible via:

Have been using above config for a long time (2 years?) without problems.

Steps:Grav 1.6.31 + 1.7.0-rc.20

  • Browse to http://dev-dev
  • Exception:

    An exception has been thrown during the rendering of a template ("Twig\Template::getAttribute(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Grav\Framework\Session\Messages" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition").

  • Browsing to http://dev-prod
    • All goes well
  • Browsing to http://localhost/site-dev
    • All goes well

Stacktrace:

[2021-01-12 09:51:40] grav.CRITICAL: An exception has been thrown during the rendering of a template ("Twig\Template::getAttribute(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Grav\Framework\Session\Messages" of the object you are trying to operate on was loaded before unserialize() gets called or provide an autoloader to load the class definition"). - Trace:
#0 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(420): Twig\Template->displayWithErrorHandling()
#1 /path/to/grav/site-dev/cache/twig/ab/ab8b61d932c33fb08f7ea34677403556ac2a0a01465e5cfab1bd347b4ece9013.php(335): Twig\Template->display()
#2 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(214): __TwigTemplate_16a54f19a8d615f9f13434bcd937e3437ff6dee8fb92593cd0d2ff8362c93444->block_messages()
#3 /path/to/grav/site-dev/cache/twig/ab/ab8b61d932c33fb08f7ea34677403556ac2a0a01465e5cfab1bd347b4ece9013.php(313): Twig\Template->displayBlock()
#4 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(214): __TwigTemplate_16a54f19a8d615f9f13434bcd937e3437ff6dee8fb92593cd0d2ff8362c93444->block_body()
#5 /path/to/grav/site-dev/cache/twig/ab/ab8b61d932c33fb08f7ea34677403556ac2a0a01465e5cfab1bd347b4ece9013.php(105): Twig\Template->displayBlock()
#6 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(453): __TwigTemplate_16a54f19a8d615f9f13434bcd937e3437ff6dee8fb92593cd0d2ff8362c93444->doDisplay()
#7 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(420): Twig\Template->displayWithErrorHandling()
#8 /path/to/grav/site-dev/cache/twig/6f/6fa9bb1556ed1498fd31a9b6e31d8c440c2282af93be702002b7e84b797bbf3e.php(35): Twig\Template->display()
#9 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(453): __TwigTemplate_f6f30d8398d4c3e9b0d377ab01049109276f355106aba3055b2c281f948e79c9->doDisplay()
#10 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(420): Twig\Template->displayWithErrorHandling()
#11 /path/to/grav/site-dev/vendor/twig/twig/src/Template.php(432): Twig\Template->display()
#12 /path/to/grav/site-dev/vendor/twig/twig/src/TemplateWrapper.php(47): Twig\Template->render()
#13 /path/to/grav/site-dev/vendor/twig/twig/src/Environment.php(384): Twig\TemplateWrapper->render()
#14 /path/to/grav/site-dev/system/src/Grav/Common/Twig/Twig.php(404): Twig\Environment->render()
#15 /path/to/grav/site-dev/system/src/Grav/Common/Service/OutputServiceProvider.php(36): Grav\Common\Twig\Twig->processSite()
#16 /path/to/grav/site-dev/vendor/pimple/pimple/src/Pimple/Container.php(118): Grav\Common\Service\OutputServiceProvider->Grav\Common\Service{closure}()
#17 /path/to/grav/site-dev/system/src/Grav/Common/Processors/RenderProcessor.php(39): Pimple\Container->offsetGet()
#18 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\RenderProcessor->process()
#19 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#20 /path/to/grav/site-dev/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle()
#21 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\DebuggerAssetsProcessor->process()
#22 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#23 /path/to/grav/site-dev/system/src/Grav/Common/Processors/PagesProcessor.php(80): Grav\Framework\RequestHandler\RequestHandler->handle()
#24 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\PagesProcessor->process()
#25 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#26 /path/to/grav/site-dev/system/src/Grav/Common/Processors/TwigProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle()
#27 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\TwigProcessor->process()
#28 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#29 /path/to/grav/site-dev/system/src/Grav/Common/Processors/AssetsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle()
#30 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\AssetsProcessor->process()
#31 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#32 /path/to/grav/site-dev/system/src/Grav/Common/Processors/SchedulerProcessor.php(40): Grav\Framework\RequestHandler\RequestHandler->handle()
#33 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\SchedulerProcessor->process()
#34 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#35 /path/to/grav/site-dev/system/src/Grav/Common/Processors/BackupsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle()
#36 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\BackupsProcessor->process()
#37 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#38 /path/to/grav/site-dev/system/src/Grav/Common/Processors/TasksProcessor.php(69): Grav\Framework\RequestHandler\RequestHandler->handle()
#39 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\TasksProcessor->process()
#40 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#41 /path/to/grav/site-dev/system/src/Grav/Common/Processors/RequestProcessor.php(63): Grav\Framework\RequestHandler\RequestHandler->handle()
#42 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\RequestProcessor->process()
#43 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#44 /path/to/grav/site-dev/system/src/Grav/Common/Processors/ThemesProcessor.php(38): Grav\Framework\RequestHandler\RequestHandler->handle()
#45 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\ThemesProcessor->process()
#46 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#47 /path/to/grav/site-dev/system/src/Grav/Common/Processors/PluginsProcessor.php(39): Grav\Framework\RequestHandler\RequestHandler->handle()
#48 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\PluginsProcessor->process()
#49 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#50 /path/to/grav/site-dev/system/src/Grav/Common/Processors/InitializeProcessor.php(128): Grav\Framework\RequestHandler\RequestHandler->handle()
#51 /path/to/grav/site-dev/system/src/Grav/Common/Debugger.php(543): Grav\Common\Processors\InitializeProcessor::Grav\Common\Processors{closure}()
#52 /path/to/grav/site-dev/system/src/Grav/Common/Processors/InitializeProcessor.php(129): Grav\Common\Debugger->profile()
#53 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(49): Grav\Common\Processors\InitializeProcessor->process()
#54 /path/to/grav/site-dev/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php(61): Grav\Framework\RequestHandler\RequestHandler->handle()
#55 /path/to/grav/site-dev/system/src/Grav/Common/Grav.php(260): Grav\Framework\RequestHandler\RequestHandler->handle()
#56 /path/to/grav/site-dev/index.php(58): Grav\Common\Grav->process()
#57 {main} [] []

@pamtbaau pamtbaau changed the title 1.6 Exception: Grav\Framework\Session\Messages 1.6 + 1.7: Exception: Grav\Framework\Session\Messages Jan 12, 2021
@pamtbaau
Copy link
Contributor Author

Ran the tests many times and now some time later, it works....

@grantholle
Copy link
Contributor

Having this issue on a fresh 1.6 install

@mahagr
Copy link
Member

mahagr commented Mar 10, 2021

@grantholle Are you sure you installed a release and not just github source?

@grantholle
Copy link
Contributor

Yeah it was from the releases. I ended up just using 1.7 as I was desperate to get it working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants