491 Installation Error (#495)

* Disable CSRF token

* Add error handling around looking up the theme and set a default

* Note about logs in issue template

* Formatting
This commit is contained in:
Nabeel S 2020-01-14 13:55:24 -05:00 committed by GitHub
parent aafc9680bf
commit d4da0a6d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 371 additions and 270 deletions

View File

@ -8,7 +8,7 @@ assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
A clear and concise description of what the bug is. Please upload the Laravel logs as well from `storage/logs/laravel.log` (or the file with the correct date)
**Version**
Please enter the version

View File

@ -8,7 +8,6 @@ use App\Http\Middleware\InstalledCheck;
use App\Http\Middleware\JsonResponse;
use App\Http\Middleware\RedirectIfAuthenticated;
use App\Http\Middleware\UpdatePending;
use App\Http\Middleware\VerifyCsrfToken;
use Illuminate\Auth\Middleware\Authenticate;
use Illuminate\Auth\Middleware\Authorize;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
@ -41,7 +40,7 @@ class Kernel extends HttpKernel
AddQueuedCookiesToResponse::class,
StartSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
// VerifyCsrfToken::class,
SubstituteBindings::class,
],
];

View File

@ -6,6 +6,7 @@ use App\Contracts\Middleware;
use Closure;
use Igaster\LaravelTheme\Facades\Theme;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
/**
* Read the current theme from the settings (set in admin), and set it
@ -14,7 +15,13 @@ class SetActiveTheme implements Middleware
{
public function handle(Request $request, Closure $next)
{
$theme = setting('general.theme');
try {
$theme = setting('general.theme');
} catch (\Exception $e) {
Log::error($e->getMessage());
$theme = 'default';
}
if (!empty($theme)) {
Theme::set($theme);
}

View File

@ -53,7 +53,7 @@
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.0",
"barryvdh/laravel-ide-helper": "^2.0",
"barryvdh/laravel-ide-helper": "^2.6",
"bpocallaghan/generators": "5.0.1",
"codedungeon/phpunit-result-printer": "^0.13.0",
"filp/whoops": "~2.0",

625
composer.lock generated

File diff suppressed because it is too large Load Diff