synolia / SyliusGDPRPlugin

Make your Sylius project GDPR compliant.
European Union Public License 1.2
18 stars 8 forks source link

Unknown routing #40

Closed baiiko closed 2 years ago

baiiko commented 2 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no

Unknown route by default

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

GalloisLuca commented 2 years ago

Hello ! Thanks for the PR. I'm not sure to understand your problem, what do you want to fix with that PR. I did try your branch on my local env and it doesn't fix anything unfortunatly :disappointed: . But if i understand, the BO can't work cause of a route name ? If so, i think you can fix it by adding the following configuration in your route file

sylius_gdpr_controllers:
    resource: '@SynoliaSyliusGDPRPlugin/Resources/config/routes/admin/gdpr.yaml'
    prefix: 'gdpr/'
    name_prefix: 'sylius_gdpr_'
GalloisLuca commented 2 years ago

It seems we made a mistake in the README. It says you should add

synolia_gdpr:
    resource: "@SynoliaSyliusGDPRPlugin/Resources/config/routes/admin/gdpr.yaml"
    prefix: '/%sylius_admin.path_name%'

But it can't work like that. You need to add the name prefix and prefix like in my last comment. I'll make a PR about it ! :smile:

baiiko commented 2 years ago

Hello ! Thanks for the PR. I'm not sure to understand your problem, what do you want to fix with that PR. I did try your branch on my local env and it doesn't fix anything unfortunatly disappointed . But if i understand, the BO can't work cause of a route name ? If so, i think you can fix it by adding the following configuration in your route file

sylius_gdpr_controllers:
    resource: '@SynoliaSyliusGDPRPlugin/Resources/config/routes/admin/gdpr.yaml'
    prefix: 'gdpr/'
    name_prefix: 'sylius_gdpr_'

Hey, because your menu use : https://github.com/synolia/SyliusGDPRPlugin/blob/06c991419ba6019d5292cf0cc1653673d4829308/src/Menu/GDPRMenuListener.php

And this route does not exists :)

oallain commented 2 years ago

Hello @GuigZ- Thanks for your feedback.

@GalloisLuca has made another PR with fix in plugin and in Readme

I test it, and it works fine. I close this one.