Repository navigation
Use Symfony routing - #36
Merged
Merged
Conversation
This will fix support in Controller::addToUrl etc.
Closed
leofeyer
pushed a commit
that referenced
this pull request
Oct 8, 2018
Description ----------- Okay this one is a bit strange as we've got only one log in Sentry about this and I was not able to reproduce it myself. So the thing is that `$objFirstPage` in the breadcrumb could _potentially_ return a null value. We do check it when generating the frontend URL on line 88 but we don't for getting the row data. Error log: ``` Error: Call to a member function row() on null #36 vendor/contao/core-bundle/src/Resources/contao/modules/ModuleBreadcrumb.php(89): compile #35 vendor/contao/core-bundle/src/Resources/contao/modules/Module.php(214): generate #34 vendor/contao/core-bundle/src/Resources/contao/modules/ModuleBreadcrumb.php(48): generate #33 vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php(326): getFrontendModule … ``` Commits ------- ddc9ddb0 Fixed the potential no first page error in breadcrumb
leofeyer
pushed a commit
that referenced
this pull request
Apr 17, 2024
Description ----------- We encountered an `ErrorException` when the page of external redirect type has an insert tag that returns an empty string. The problem in fact happens in the `UrlHelper` component of Symfony, but I think we should fix it on our side nevertheless. Stack trace: ``` ErrorException: Warning: Uninitialized string offset 0 #36 /vendor/symfony/http-foundation/UrlHelper.php(42): Symfony\Component\HttpFoundation\UrlHelper::getAbsoluteUrl #35 /vendor/contao/core-bundle/src/Routing/Content/StringResolver.php(40): Contao\CoreBundle\Routing\Content\StringResolver::resolve #34 /vendor/contao/core-bundle/src/Routing/ContentUrlGenerator.php(150): Contao\CoreBundle\Routing\ContentUrlGenerator::resolveContent #33 /vendor/contao/core-bundle/src/Routing/ContentUrlGenerator.php(161): Contao\CoreBundle\Routing\ContentUrlGenerator::resolveContent #32 /vendor/contao/core-bundle/src/Routing/ContentUrlGenerator.php(70): Contao\CoreBundle\Routing\ContentUrlGenerator::generate #31 /vendor/contao/core-bundle/contao/modules/Module.php(349): Contao\Module::renderNavigation #30 /vendor/contao/core-bundle/contao/modules/Module.php(326): Contao\Module::renderNavigation #29 /vendor/contao/core-bundle/contao/modules/Module.php(326): Contao\Module::renderNavigation #28 /vendor/contao/core-bundle/contao/modules/ModuleNavigation.php(82): Contao\ModuleNavigation::compile #27 /vendor/contao/core-bundle/contao/modules/Module.php(213): Contao\Module::generate #26 /vendor/contao/core-bundle/contao/modules/ModuleNavigation.php(45): Contao\ModuleNavigation::generate #25 /vendor/contao/core-bundle/contao/library/Contao/Controller.php(410): Contao\Controller::getFrontendModule … #1 /vendor/friendsofsymfony/http-cache/src/SymfonyCache/EventDispatchingHttpCache.php(96): Contao\ManagerBundle\HttpKernel\ContaoCache::handle #0 /public/index.php(42): null ``` Commits ------- 756336e7 Fix a potential issue if the insert tags return an empty string in th… 0a9330c2 Throw an exception if the insert tag returns an empty value 46de08ef CS + Unit test 89521539 Rename the test method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A simple approach…