Issues with route enhancers 9.5LTS 2019.10
Posted: 20 Jan 2020, 12:25
Hi all, is the route enhancer example in the wiki the current best practice for generating speaking URLs in Typo3?
I have tried that in my config.yaml and it doesn't seem to work for me.
examples:
List/Grid widget in list plugin
Product detail links from list plugin
Category Tree Links
Sorting Links
Pagination
With it in place, some query parameters in links are not generated with square brackets and widgets like next/previous in the stage, or grid/list, or sorting do not work.
If I comment out the route enhancers and refresh the cache, I lose the URL mappings but all the various widgets/plugins in aimeos work.
When the enhancers are enabled, if I manually edit the generated query strings to put back in any square brackets the features work: eg: change back to
Have I missed something obvious here?
Current route enhancers:
I have tried that in my config.yaml and it doesn't seem to work for me.
examples:
List/Grid widget in list plugin
Code: Select all
(demo.typo3.aimeos.org): http://typo3.demo.aimeos.org/demo/?ai%5Bl_type%5D=list
(my demo site): https://<domain>/your-shop/shop/?ai__l_type=list
Code: Select all
(demo.typo3.aimeos.org): http://typo3.demo.aimeos.org/demo/detail/d/10019/Demo_article/0/
(my demo site): https://<domain>/your-shop/shop/detail/Demo_article?ai__d_pos=0
Code: Select all
(demo.typo3.aimeos.org): http://typo3.demo.aimeos.org/demo/f/1/Home/
(my demo site): https://<domain>/your-shop/shop/Home~1200
Code: Select all
(demo.typo3.aimeos.org): http://typo3.demo.aimeos.org/demo/s/price/
(my demo site): https://<domain>/your-shop/shop/?ai__f_sort=price
Code: Select all
(demo.typo3.aimeos.org): http://typo3.demo.aimeos.org/performance/l/3/
(my demo site): https://<domain>/your-shop/shop/?ai__l_page=2
If I comment out the route enhancers and refresh the cache, I lose the URL mappings but all the various widgets/plugins in aimeos work.
When the enhancers are enabled, if I manually edit the generated query strings to put back in any square brackets the features work: eg: change
Code: Select all
?ai__l_type=list
Code: Select all
?ai[l_type]=list
Current route enhancers:
Code: Select all
routeEnhancers:
AimeosList:
type: Extbase
namespace: ai
limitToPages:
- 271
routes:
-
routePath: /
_controller: 'Catalog::list'
-
routePath: '/{f_name}~{f_catid}'
_controller: 'Catalog::list'
-
routePath: '/{f_name}~{f_catid}'
_controller: 'Catalog::tree'
AimeosDetail:
type: Extbase
namespace: ai
limitToPages:
- 279
routes:
-
routePath: '/{d_name}'
_controller: 'Catalog::detail'
-
routePath: '/{d_name}/d/{d_prodid}'
_controller: 'Catalog::detail'
-
routePath: '/pin/{pin_action}/{pin_id}/{d_name}'
_controller: 'Catalog::detail'
defaults:
d_pos: ''
AimeosBasket:
type: Extbase
namespace: ai
limitToPages:
- 278
routes:
-
routePath: /
_controller: 'Basket::index'
-
routePath: /{b_action}
_controller: 'Basket::index'
AimeosCheckout:
type: Extbase
namespace: ai
limitToPages:
- 277
routes:
-
routePath: /
_controller: 'Checkout::index'
-
routePath: /{c_step}
_controller: 'Checkout::index'
AimeosConfirm:
type: Simple
limitToPages:
- 276
routePath: /{code}
AimeosProfile:
type: Extbase
namespace: ai
limitToPages:
- 269
routes:
-
routePath: /
_controller: 'Account::index'
-
routePath: /
_controller: 'Account::watch'
-
routePath: /
_controller: 'Account::favorite'
-
routePath: /watch/{wat_action}
_controller: 'Account::watch'
-
routePath: /watch/{wat_action}/{wat_id}
_controller: 'Account::watch'
-
routePath: /fav/{fav_action}
_controller: 'Account::favorite'
-
routePath: /fav/{fav_action}/{fav_id}
_controller: 'Account::favorite'
-
routePath: /history/{his_action}/{his_id}
_controller: 'Account::history'