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

404 Tag Not Working #1541

Closed
nobodyiscertain opened this Issue Aug 5, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@nobodyiscertain

nobodyiscertain commented Aug 5, 2017

Expected behaviour

I put the {{ 404 }} tag into my page template or layout and it renders my 404 page.

Actual behaviour

I get a FatalThrowableError

Steps to reproduce

  1. Put {{ 404 }} tag into any template
  2. Load that page in your browser

Server Details

Operating System:
OSX 10.12.6

Web Server:
MAMP/Apache

PHP Version:
7.0.15

Statamic Version:
2.6.1

Updated from an older Statamic or fresh install:
Updated

List of installed addons:
Bluebird
VideoEmbed
2 custom ones

Logs

If any logs (browser, server, or Statamic) are appropriate...

``` [2017-08-05 05:08:07] dev.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function layout() on array in /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Http/View.php:150 Stack trace: #0 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Http/View.php(87): Statamic\Http\View->getLayout() #1 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Http/View.php(61): Statamic\Http\View->updateDataStore() #2 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Exceptions/Handler.php(108): Statamic\Http\View->render(Array, 'errors/404') #3 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(86): Statamic\Exceptions\Handler->render(Object(Illuminate\Http\Request), Object(Statamic\Exceptions\UrlNotFoundException)) #4 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/barryvdh/laravel-debugbar/src/Middleware/Debugbar.php(53): Barryvdh\Debugbar\Middleware\Debugbar->handleException(Object(Illuminate\Http\Request), Object(Statamic\Exceptions\UrlNotFoundException)) #5 [internal function]: Barryvdh\Debugbar\Middleware\Debugbar->handle(Object(Illuminate\Http\Request), Object(Closure)) #6 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #7 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Http/Middleware/PersistStache.php(22): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #8 [internal function]: Statamic\Http\Middleware\PersistStache->handle(Object(Illuminate\Http\Request), Object(Closure)) #9 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #10 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #11 [internal function]: Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #12 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #13 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #14 [internal function]: Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #15 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #16 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(62): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #17 [internal function]: Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #18 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #19 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #20 [internal function]: Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #21 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #22 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(59): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #23 [internal function]: Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #24 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #25 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/Http/Middleware/Glide.php(50): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #26 [internal function]: Statamic\Http\Middleware\Glide->handle(Object(Illuminate\Http\Request), Object(Closure)) #27 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #28 /Users/nobodyiscertain/Code/partners.ngo/statamic/core/StaticCaching/Middleware/Retrieve.php(33): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #29 [internal function]: Statamic\StaticCaching\Middleware\Retrieve->handle(Object(Illuminate\Http\Request), Object(Closure)) #30 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #31 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(44): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #32 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #33 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_user_func_array(Array, Array) #34 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #35 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): call_user_func(Object(Closure), Object(Illuminate\Http\Request)) #36 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(122): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #37 /Users/nobodyiscertain/Code/partners.ngo/statamic/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(87): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #38 /Users/nobodyiscertain/Code/partners.ngo/index.php(155): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #39 {main} ```
@anthubbard

This comment has been minimized.

anthubbard commented Aug 7, 2017

Just to be unhelpful this works fine for me on 2.6.1

@nobodyiscertain

This comment has been minimized.

nobodyiscertain commented Aug 7, 2017

This is a locale enabled site, maybe it's something with that?

@jasonvarga

This comment has been minimized.

Member

jasonvarga commented Aug 7, 2017

I see the error too, no worries.

@bhashkar007

This comment has been minimized.

bhashkar007 commented Dec 31, 2017

@jasonvarga please let me know if its being fixed. I am facing the same issue in the site with multiple Locales. I am using Statamic v2.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment