manimonji's avatar

manimonji liked a comment+100 XP

2mos ago

Then you've got something mixed up. Blade templates you gave should produce doctype if it is in layout you extend. Laravel doesn't cut out your doctype.

manimonji's avatar

manimonji wrote a reply+100 XP

2mos ago

Thanks, I'll look that up. Yet I think it should work, not marked as deprecated in the document page you've sent.

manimonji's avatar

manimonji wrote a reply+100 XP

2mos ago

Surely the generated one doesn't have a doctype

manimonji's avatar

manimonji started a new conversation+100 XP

2mos ago

I have this blade page

I have the doctype in layout, this:

, but every page using this says Quirks Mode. adding it to the blade page itself instead of layout solves it. like this:

page html after it's rendered:

manimonji's avatar

manimonji started a new conversation+100 XP

2mos ago

If I sign up a new user with a fake gmail then try to log out, that works. (logging out also done by a form) but If I verify my email (using the default email verification functionality in laravel) a new tab opens, and in that new tab I can't use any forms. I can't log out, I can't comment, I CAN use links and do other stuff without any problem. clicking the submit button of forms, doesn't send a request. Doesn't reload the current page and doesn't redirect. No js errors no errors in logs, no errors nowhere. nothing.

Email verification leads user to a new tab, so they can close the old tab. The thing is everything works in the old tab. Same sessions and cookies in both tabs.

I guess this doesn't help, but here's the code used for email verification:

Route::get('/email/verify', function () {
    return view('auth.verify-email');
})->middleware('auth')->name('verification.notice');

Route::post('/email/verification-notification', function (Request $request) {
    $request->user()->sendEmailVerificationNotification();
    return back()->with('message', 'Verification link sent!');
})->middleware(['auth', 'throttle:6,1'])->name('verification.send');

Route::get('/email/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
    $request->fulfill();
    return redirect()->route('dashboard')->with('success', 'ایمیل با موفقیت تایید شد');
})->middleware(['auth', 'signed'])->name('verification.verify');

Also server restarts fix the problem for the users made before the restart.

I've been debugging this for hours, with and without ai. (Not surprisingly AI mostly mislead me to unrelated stuff)

Anything that relates email verification to csrf tokens, cookies, session, any variable that can be different in two tabs, helps.

Don't know what is this related to, so I put it in general