Issues with route enhancers 9.5LTS 2019.10
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 22
- Joined: 26 Oct 2019, 12:38
Issues with route enhancers 9.5LTS 2019.10
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'
Re: Issues with route enhancers 9.5LTS 2019.10
The TYPO3 demo site still uses TYPO3 v8 and RealUrl, so it doesn't use the new route enhancers of TYPO3 v9. We are still trying to find the best setup for v9 and the rules in the docs are the one that works best for most installations but not for all.
We still don't know why parameters not matched by the route enhancer rules are sometimes translated from ai[...] to ai__... and why TYPO3 doesn't translates them back. Maybe the route configuration mentioned here works better in your case:
post9835.html?hilit=routePath#p9835
We still don't know why parameters not matched by the route enhancer rules are sometimes translated from ai[...] to ai__... and why TYPO3 doesn't translates them back. Maybe the route configuration mentioned here works better in your case:
post9835.html?hilit=routePath#p9835
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Issues with route enhancers 9.5LTS 2019.10
In my case , ( I am using nginx ) some of get params got lost at redirect. Highly likely, the differences in settings of the webservers (apache , nginx ) are produces an unstable work.
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic
-
- Posts: 22
- Joined: 26 Oct 2019, 12:38
Re: Issues with route enhancers 9.5LTS 2019.10
So I've moved over to the linked routeEnhancers (I see the wiki is using them as the recommendation now) they seem to work OK on the list view page.
However, if I drill down to a category in the tree (there is a breadcrumb in the stage for cat1/cat2/cat3 etc) and go to the detail view, the href in the breadcrumb links in the stage plugin on the detail page links to the detail page.
Link from stage detail breadcrumb: https://example.com/your-shop/shop/detail?ai%5Bf_catid%5D=1201&ai%5Bf_name%5D=cat3&ai%5Bcontroller%5D=Catalog&ai%5Baction%5D=tree
I want that breadcrumb to go back to /your-shop/shop? not to /your-shop/shop/detail?
I then get an error that there is no product with id "" I suppose as I have not defined a default product in the detail plugin.
My expectation would be that clicking on a breadcrumb link in the stage on the detail page would take you back to the list page and display the selected category? Is there a way to set the target of the stage links on the detail page to the list page with config or the route enhancers?
Otherwise it might seem a bit strange to click on the breadcrumb on the detail page and get a 'default' product loaded instead of the list of all items under a category.
I notice the old realurl demo shops for typo3 seem to work that way (going back to the list page).
TYPO3: 9.5.13, Aimeos 19.10, php 7.3 linux
However, if I drill down to a category in the tree (there is a breadcrumb in the stage for cat1/cat2/cat3 etc) and go to the detail view, the href in the breadcrumb links in the stage plugin on the detail page links to the detail page.
Link from stage detail breadcrumb: https://example.com/your-shop/shop/detail?ai%5Bf_catid%5D=1201&ai%5Bf_name%5D=cat3&ai%5Bcontroller%5D=Catalog&ai%5Baction%5D=tree
I want that breadcrumb to go back to /your-shop/shop? not to /your-shop/shop/detail?
I then get an error that there is no product with id "" I suppose as I have not defined a default product in the detail plugin.
My expectation would be that clicking on a breadcrumb link in the stage on the detail page would take you back to the list page and display the selected category? Is there a way to set the target of the stage links on the detail page to the list page with config or the route enhancers?
Otherwise it might seem a bit strange to click on the breadcrumb on the detail page and get a 'default' product loaded instead of the list of all items under a category.
I notice the old realurl demo shops for typo3 seem to work that way (going back to the list page).
TYPO3: 9.5.13, Aimeos 19.10, php 7.3 linux
Re: Issues with route enhancers 9.5LTS 2019.10
The flexform configuration for the list page was missing in the catalog stage plugin due to a change in handling. This has been fixed in 2019.10.x-dev 1-2 weeks ago and will be part of the next release.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 22
- Joined: 26 Oct 2019, 12:38
Re: Issues with route enhancers 9.5LTS 2019.10
Great, I'll try that change out!
Edit: patching in that dev branch commit works. Thanks again.
Edit: patching in that dev branch commit works. Thanks again.
-
- Posts: 22
- Joined: 26 Oct 2019, 12:38
Re: Issues with route enhancers 9.5LTS 2019.10
Upgraded to latest 9.5.14 LTS and trying the routeenhancers on the Aimeos wiki.
Seems like pretty much everything works except d_pos and d_name on list and detail pages still seem to get rendered as without square brackets.
I admit I'm not sure about how to even debug something like this.
Seems like pretty much everything works except d_pos and d_name on list and detail pages still seem to get rendered as without square brackets.
I admit I'm not sure about how to even debug something like this.