charliedevelopment / craft3-fallback-site

Failing requests in a multi-site install can fall back to other sites, to prevent 404 errors from missing or disabled entries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning getMatchedElement

davidpp opened this issue · comments

Hi!

I keep seeing this in our log:

018-11-05 06:19:07 [207.134.138.186][-][-][warning][craft\web\UrlManager::getMatchedElement] craft\web\UrlManager::getMatchedElement() was called before the application was fully initialized.Stack trace:
#0 craft\web\UrlManager->getMatchedElement() called at [/var/www/okam/releases/40823bd2c8b92b68b8bfd53f21974b9f26844811/vendor/charliedev/fallback-site/src/FallbackSite.php:87]#1 charliedev\fallbacksite\FallbackSite->checkFallbackEntry() called at [/var/www/okam/releases/40823bd2c8b92b68b8bfd53f21974b9f26844811/vendor/charliedev/fallback-site/src/FallbackSite.php:36]#2 charliedev\fallbacksite\FallbackSite->charliedev\fallbacksite{closure}()
...

Let me know if you need anymore information or if you think if might be due to the way we use your plugin.

This was brought about by a change in Craft as a result of some discussion a while back. Generally, this would still be safe, but I've updated Fallback Site (now 1.2.1) to use the proper event, so you shouldn't see the warning anymore. Thanks for the report.

Didn't expect a fix so soon, thanks !!!