featdd / dpn_glossary

Glossary extension for TYPO3
http://typo3.org/extensions/repository/view/dpn_glossary
GNU General Public License v2.0
20 stars 29 forks source link

URL generation problem with slash in term name #201

Closed loeffe1 closed 10 months ago

loeffe1 commented 1 year ago

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'
featdd commented 11 months ago

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

loeffe1 commented 10 months ago

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.

featdd commented 10 months ago

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

loeffe1 commented 10 months ago

The error was caused by my overwritten termWraps. I was now able to fix it. Thanks four your help!

braukma commented 10 months ago

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

featdd commented 10 months ago

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

braukma commented 10 months ago

Hi Daniel, I searched a bit more, found issue #189 and reading your answer realised this issue adresses slugs. :-) My slugs are fine, but I am seeing the same trouble that's mentioned in #189. I'll move my request there.