Fix variable name for correct routing

This commit is contained in:
2025-10-02 15:22:42 +02:00
parent 86422a5946
commit f2922018ce
13 changed files with 11 additions and 16 deletions

View File

@@ -327,7 +327,7 @@ final class EventController extends AbstractController
$this->addFlash('success', $this->translator->trans('The event was updated'));
return $this->redirectToRoute('chill_event__event_show', ['id' => $event_id]);
return $this->redirectToRoute('chill_event__event_show', ['event_id' => $event_id]);
}
return $this->render('@ChillEvent/Event/edit.html.twig', [

View File

@@ -228,7 +228,7 @@ final class ParticipationController extends AbstractController
}
return $this->redirectToRoute('chill_event__event_show', [
'id' => $participation->getEvent()->getId(),
'event_id' => $participation->getEvent()->getId(),
]);
}
@@ -442,7 +442,7 @@ final class ParticipationController extends AbstractController
));
return $this->redirectToRoute('chill_event__event_show', [
'id' => $participation->getEvent()->getId(),
'event_id' => $participation->getEvent()->getId(),
]);
}

View File

@@ -12,7 +12,7 @@
'title' : 'Delete event'|trans,
'confirm_question' : 'Are you sure you want to remove that event ?'|trans,
'cancel_route' : activeRouteKey,
'cancel_parameters' : { 'id' : id },
'cancel_parameters' : { 'event_id' : id },
'form' : delete_form
}
) }}

View File

@@ -34,7 +34,7 @@
<ul class="record_actions">
<li>
{# {% if is_granted('CHILL_EVENT_SEE_DETAILS', event) %} #}
<a href="{{ path('chill_event__event_show', { 'id' : event.id } ) }}" class="btn btn-view">
<a href="{{ path('chill_event__event_show', { 'event_id' : event.id } ) }}" class="btn btn-view">
{{ 'See'|trans }}
</a>
{# {% endif %} #}

View File

@@ -115,7 +115,7 @@ block js %}
href="{{
chill_path_add_return_path(
'chill_event__event_show',
{ id: e.id }
{ event_id: e.id }
)
}}"
class="btn btn-show"

View File

@@ -33,7 +33,7 @@
{% set returnPath = app.request.get('return_path') %}
{% set returnLabel = app.request.get('return_label') %}
<a href="{{ returnPath |default( path('chill_event__event_show', { 'id' : participation.event.id } )) }}" class="btn btn-cancel">
<a href="{{ returnPath |default( path('chill_event__event_show', { 'event_id' : participation.event.id } )) }}" class="btn btn-cancel">
{{ returnLabel |default('Back to the event'|trans) }}
</a>
</li>

View File

@@ -34,7 +34,7 @@
<ul class="record_actions sticky-form-buttons">
<li class="cancel">
<a href="{{ path('chill_event__event_show', { 'id' : participation.event.id } ) }}" class="btn btn-cancel">
<a href="{{ path('chill_event__event_show', { 'event_id' : participation.event.id } ) }}" class="btn btn-cancel">
{{ 'Back to the event'|trans }}
</a>
</li>

View File

@@ -40,7 +40,6 @@ use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Routing\Attribute\Route;

View File

@@ -50,7 +50,7 @@ final readonly class SavedExportController
private RequestStack $requestStack,
) {}
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/{id}/delete', name: 'chill_main_export_saved_delete')]
#[Route(path: '/{_locale}/exports/saved/{id}/delete', name: 'chill_main_export_saved_delete')]
public function delete(#[MapEntity(id: 'id')] SavedExport $savedExport, Request $request): Response
{
if (!$this->security->isGranted(SavedExportVoter::DELETE, $savedExport)) {
@@ -186,7 +186,7 @@ final readonly class SavedExportController
);
}
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/{id}/edit', name: 'chill_main_export_saved_edit')]
#[Route(path: '/{_locale}/exports/saved/{id}/edit', name: 'chill_main_export_saved_edit')]
public function edit(#[MapEntity(id: 'id')] SavedExport $savedExport, Request $request): Response
{
if (!$this->security->isGranted(SavedExportVoter::EDIT, $savedExport)) {
@@ -217,7 +217,7 @@ final readonly class SavedExportController
);
}
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/exports/saved/{savedExport}/edit-options/{exportGeneration}', name: 'chill_main_export_saved_options_edit')]
#[Route(path: '/{_locale}/exports/saved/{savedExport}/edit-options/{exportGeneration}', name: 'chill_main_export_saved_options_edit')]
public function updateOptionsFromGeneration(SavedExport $savedExport, ExportGeneration $exportGeneration, Request $request): Response
{
if (!$this->security->isGranted(SavedExportVoter::DUPLICATE, $savedExport)) {

View File

@@ -13,7 +13,6 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Attribute\Groups;
/**

View File

@@ -15,7 +15,6 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;

View File

@@ -18,7 +18,6 @@ use Chill\PersonBundle\Repository\ResidentialAddressRepository;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Attribute\Groups;
#[ORM\Entity(repositoryClass: ResidentialAddressRepository::class)]

View File

@@ -24,7 +24,6 @@ use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM;
use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Attribute\Context;
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
use Symfony\Component\Serializer\Attribute\Groups;
use Symfony\Component\Validator\Constraints as Assert;