From bf8a890650d152f01a1244e0eed2ad52f7712ea4 Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Sun, 17 Nov 2024 14:46:09 +0100 Subject: [PATCH] Fix bug with template not rendering correctly This bug didn't occur on production because unknown variable errors are hidden in production mode. The variable was used in an inherited template so the bug was hidden. --- src/Controller/ContributionController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Controller/ContributionController.php b/src/Controller/ContributionController.php index baa3150..853841b 100644 --- a/src/Controller/ContributionController.php +++ b/src/Controller/ContributionController.php @@ -214,7 +214,9 @@ public function automaticCollection(Request $request, LoggerInterface $logger): return $this->render('user/contribution/automatic-collection.html.twig', [ 'success' => false, 'form' => $form->createView(), - 'contribution' => $org_config['contribution'] + 'contribution' => $org_config['contribution'], + // The user is currently setting up contribution, so setting this false disables the contribution nagbar + 'contributionEnabled' => false, ]); }