Help configuring route enhancer
SilentHunter124 opened this issue · comments
Extension version
6.5.2
Short problem description
How do I get route enhancers running? I just wanted the detail page of an event printed on flyers with an qr code. Unfortunately the slug generated on one event (multilanguage says: /de/{event_title}) only responds with 404 page... :(
Steps to reproduce
- Create some events with english and german descriptions
- pinned url slug to something with title
- configured site.yaml:
routeEnhancers:
EventDetailPlugin:
type: Extbase
limitToPages:
- 60
extension: SfEventMgt
plugin: Pieventdetail
routes:
-
routePath: '/de/{event_title}'
_controller: 'Event::detail'
_arguments:
event_title: event
-
routePath: '/de/{event_title}/ical'
_controller: 'Event::icalDownload'
_arguments:
event_title: event
defaultController: 'Event::detail'
aspects:
event_title:
type: PersistedAliasMapper
tableName: tx_sfeventmgt_domain_model_event
routeFieldName: slug
Expected behaviour
The displayed slug url of an event should display detail page of the event.
Actual behaviour
Typo3 Responds with 404 Page
Server configuration
TYPO3 version:
11.5.32
PHP version:
8.1.27
Please refer to the extension documentation: https://docs.typo3.org/p/derhansen/sf_event_mgt/7.4/en-us/ForAdministrators/Configuration/RouteEnhancers/Index.html
Also refer to the TYPO3 routing documentation, since it is not neccessary to create language slugs manually as shown in your example, since the language identifier will automatically be added when configured properly (see screenshot)
You can definy any entry point (the language slug) per language, also if you just have one language.
If that does not help, I suggest you either ask on TYPO3 slack or Stackoverflow for help.
OK thanks, I got it working now, just to clarify the slug in the event details currently does not match because the event detail page is on a subpage, does it need to be identical?
For example it shows in the event details: xyz.de/de/ but actually is: xyz.de/de/service/events/
Should it match?
Sorry, I do not understand your question. In general, this is all configuration, but I can not help with that. Please ask for help on TYPO3 slack or Stackoverflow