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:
@@ -8,7 +8,7 @@ assignees: ''
|
|||||||
---
|
---
|
||||||
|
|
||||||
**Describe the bug**
|
**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**
|
**Version**
|
||||||
Please enter the version
|
Please enter the version
|
||||||
|
|||||||
+1
-2
@@ -8,7 +8,6 @@ use App\Http\Middleware\InstalledCheck;
|
|||||||
use App\Http\Middleware\JsonResponse;
|
use App\Http\Middleware\JsonResponse;
|
||||||
use App\Http\Middleware\RedirectIfAuthenticated;
|
use App\Http\Middleware\RedirectIfAuthenticated;
|
||||||
use App\Http\Middleware\UpdatePending;
|
use App\Http\Middleware\UpdatePending;
|
||||||
use App\Http\Middleware\VerifyCsrfToken;
|
|
||||||
use Illuminate\Auth\Middleware\Authenticate;
|
use Illuminate\Auth\Middleware\Authenticate;
|
||||||
use Illuminate\Auth\Middleware\Authorize;
|
use Illuminate\Auth\Middleware\Authorize;
|
||||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||||
@@ -41,7 +40,7 @@ class Kernel extends HttpKernel
|
|||||||
AddQueuedCookiesToResponse::class,
|
AddQueuedCookiesToResponse::class,
|
||||||
StartSession::class,
|
StartSession::class,
|
||||||
ShareErrorsFromSession::class,
|
ShareErrorsFromSession::class,
|
||||||
VerifyCsrfToken::class,
|
// VerifyCsrfToken::class,
|
||||||
SubstituteBindings::class,
|
SubstituteBindings::class,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ use App\Contracts\Middleware;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use Igaster\LaravelTheme\Facades\Theme;
|
use Igaster\LaravelTheme\Facades\Theme;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read the current theme from the settings (set in admin), and set it
|
* 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)
|
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)) {
|
if (!empty($theme)) {
|
||||||
Theme::set($theme);
|
Theme::set($theme);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.0",
|
"barryvdh/laravel-debugbar": "^3.0",
|
||||||
"barryvdh/laravel-ide-helper": "^2.0",
|
"barryvdh/laravel-ide-helper": "^2.6",
|
||||||
"bpocallaghan/generators": "5.0.1",
|
"bpocallaghan/generators": "5.0.1",
|
||||||
"codedungeon/phpunit-result-printer": "^0.13.0",
|
"codedungeon/phpunit-result-printer": "^0.13.0",
|
||||||
"filp/whoops": "~2.0",
|
"filp/whoops": "~2.0",
|
||||||
|
|||||||
Generated
+360
-265
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user