From bb61ae87ded07506ee5de775acfb5d50870214b9 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Tue, 13 Oct 2026 09:29:50 +0100 Subject: [PATCH 1/3] Cap event detail hero images at 500px tall. Large imported photos were blowing out the first viewport with a fixed 520px desktop height. Co-authored-by: Cursor --- resources/views/event/show.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/event/show.blade.php b/resources/views/event/show.blade.php index eace7636a..472a4d8a9 100644 --- a/resources/views/event/show.blade.php +++ b/resources/views/event/show.blade.php @@ -75,7 +75,7 @@ @endif
- +
@canany(['edit', 'delete'], $event) From f2dd9db112c45036f99e624b4f1340497b5ea488 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Wed, 14 Oct 2026 17:23:37 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Now=20run=20check.Fixed=20in=20code;=20Lina?= =?UTF-8?q?'s=20own=20record=20still=20needs=20the=20code=20s=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Creation paths that skip EventsQuery::store() (imports set '', Nova) hit this - - Change: 5 lines in approve() - if empty, set cw{yy}-{5 random alnum} in same update() call before mail is queued - Matches pattern used by support tool /^cw\d{2}-[A-Za-z0-9]+$/ - - Test: added to tests/Feature/ApproveEventTest.php, asserts generated code + code present in rendered mail --- app/Event.php | 5 +++++ tests/Feature/ApproveEventTest.php | 27 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/app/Event.php b/app/Event.php index 2c4060212..0857e36e1 100644 --- a/app/Event.php +++ b/app/Event.php @@ -416,6 +416,11 @@ public function approve() { $data = ['status' => 'APPROVED', 'approved_by' => auth()->user()->id]; + // Imported/Nova-created events can reach approval without a code, and the email prints it verbatim. + if (empty($this->codeweek_for_all_participation_code)) { + $data['codeweek_for_all_participation_code'] = 'cw'.now()->format('y').'-'.Str::random(5); + } + $this->update($data); if (! empty($this->user_email)) { diff --git a/tests/Feature/ApproveEventTest.php b/tests/Feature/ApproveEventTest.php index ff6501eb4..bbb036125 100644 --- a/tests/Feature/ApproveEventTest.php +++ b/tests/Feature/ApproveEventTest.php @@ -194,4 +194,31 @@ public function ambassadors_of_right_country_can_see_the_approve_banner(): void ->assertSee('moderate-event'); } + + #[Test] + public function approving_event_without_participation_code_generates_one_for_the_email(): void + { + $this->withExceptionHandling(); + + Mail::fake(); + + $superadmin = \App\User::factory()->create(); + $superadmin->assignRole('super admin'); + + $this->signIn($superadmin); + + $event = \App\Event::factory()->create([ + 'status' => 'PENDING', + 'user_email' => 'foo@bar.com', + 'codeweek_for_all_participation_code' => null, + ]); + + $event->approve(); + + $event = $event->fresh(); + $code = (string) $event->codeweek_for_all_participation_code; + + $this->assertMatchesRegularExpression('/^cw\d{2}-[A-Za-z0-9]+$/', $code); + $this->assertStringContainsString($code, (new EventApproved($event, $event->owner))->render()); + } } From af8645e8b1e6893cb07ad6045e6322e9a0f52498 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Thu, 15 Oct 2026 12:15:39 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Add=20'confirmed'=20to=20the=20password=20r?= =?UTF-8?q?ules=20(one=20line;=20matches=20ResetPasswor=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Found the likely root cause - Applying the fix: Yes - it's a real bug affecting every new user, not just the person who wrote in - which is exactly the "I registered, now I can't log in" pattern people report - What changed (worktree bernd/edit-202610151022, nothing committed): --- .../Controllers/Auth/RegisterController.php | 2 +- resources/views/auth/register.blade.php | 2 +- .../Auth/RegisterPasswordConfirmationTest.php | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 tests/Feature/Auth/RegisterPasswordConfirmationTest.php diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 2a8cfd678..a219ad12b 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -50,7 +50,7 @@ protected function validator(array $data): \Illuminate\Contracts\Validation\Vali return Validator::make($data, [ 'name' => 'required|string|max:255', 'email' => 'required|string|email|max:255|unique:users', - 'password' => ['required', 'string', Password::defaults()], + 'password' => ['required', 'string', 'confirmed', Password::defaults()], 'privacy' => 'required', ]); } diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 9a5735e2d..3999ef9e2 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -84,7 +84,7 @@ class="border-2 border-solid border-dark-blue-200 w-full rounded-full h-12 px-4
- @component('components.validation-errors', ['field'=>'password'])@endcomponent + @component('components.validation-errors', ['field'=>'password_confirmation'])@endcomponent
diff --git a/tests/Feature/Auth/RegisterPasswordConfirmationTest.php b/tests/Feature/Auth/RegisterPasswordConfirmationTest.php new file mode 100644 index 000000000..3385edc3b --- /dev/null +++ b/tests/Feature/Auth/RegisterPasswordConfirmationTest.php @@ -0,0 +1,25 @@ +post('/register', [ + 'name' => 'Test User', + 'email' => 'mismatch@example.com', + 'password' => 'Xq7!vT2#Lm9@', + 'password_confirmation' => 'Xq7!vT2#Lm9@Z', + 'privacy' => '1', + ]); + + $response->assertSessionHasErrors('password'); + $this->assertDatabaseMissing('users', ['email' => 'mismatch@example.com']); + } +}