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:
parent
aafc9680bf
commit
d4da0a6d6a
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -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
|
||||
|
@ -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,
|
||||
],
|
||||
];
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
625
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user