URL generation problem with slash in term name
loeffe1 opened this issue · comments
Hi,
we are using version 4.2.0 or your extension (patched to include the umlaut fix included in versions 5.0.2 and 5.0.3) and am having problems with terms that include slashes.
I see you have included a replacements config for slahes in generatorOptions and the generated urls do represent that, yet I am still getting this error when including slashes in term names:
Parameter "ab12b08fc0c92fa466483423948dbb6" for route "tx_dpnglossary_glossary_0" must match "[^/]++" ("term/name" given) to generate a corresponding URL.
We are using trailing slashes:
PageTypeSuffix:
type: PageType
default: /
index: ''
map:
/: 0
and have these routes configured for dpn_glossary:
routes:
- routePath: '/buchstabe/{letter}'
_controller: 'Term::list'
_arguments:
letter: 'filterletter'
requirements:
filterletter: '[a-zA-Z]'
- routePath: '/{searchterm}'
_controller: 'Term::list'
_arguments:
searchterm: 'filterword'
defaultController: 'Term::list'
Hi @loeffe1,
normally slashes should be replaced when saving the term, they can break the routing in this context.
Correct me if I'm wrong but I think this just works pages only now!?
Greetings
Daniel
As described, when looking at the url_segment in the term, it is correctly shown with slashes replaced by dashes, however the error shows up in the frontend. Could be that this is caused because at the moment, it is only working correctly for pages.
Hi @loeffe1,
I don't know if maybe somethings is wrong with your routing configuration!?
Can you try to use the example from the documentation, that should be working fine.
Greetings
Daniel
The error was caused by my overwritten termWraps. I was now able to fix it.
Thanks four your help!
Hi Loeffe1,
I am facing some Umlaut Trouble with Version 4.2.0 and wonder about the "umlaut patch" you're mentioning. Have not found anything yet. Can you give me an hint? Searching, I landed here. :-)
Jürgen
Hi @braukma,
I never tried using umlauts in a slug, I think the TYPO3 field should prevent this anyway!?
Maybe you want to checkout the latest version 5.0.4 of this extension.
Greetings
Daniel