1

Following is my config.yaml configuration to make the detail page URL user friendly.

News:
type: Extbase
limitToPages:
  - 23
extension: News
plugin: Pi1
routes:
  -
    routePath: '{news_title}'
    _controller: 'News::detail'
    _arguments:
      news_title: news
  -
    routePath: '/topic/{category_name}'
    _controller: 'News::list'
    _arguments:
      category_name: overwriteDemand/categories
defaultController: 'News::list'
defaults:
  page: '0'
requirements:
  news_title: '^[a-zA-Z0-9].*$'
  page: \d+
aspects:
  news_title:
    type: PersistedAliasMapper
    tableName: tx_news_domain_model_news
    routeFieldName: path_segment
  category_name:
    type: PersistedAliasMapper
    tableName: sys_category
    routeFieldName: path_segment
NewsList:
type: Plugin
routePath: '/browse/{@widget_0/currentPage}'
namespace: tx_news_pi1
aspects:
  '@widget_0/currentPage':
    type: StaticRangeMapper
    start: '1'
    end: '1000'

I need a URL like: https://www.example.com/article/lorem-ipsum-dolor

But the obtained URL is: https://www.example.com/article/?tx_news_pi1%5Bnews%5D=1&cHash=0bfd8bb6d92152b35569116fa86a2406

The same code is used in other projects too It is perfectly working there. But in my sitemap.xml I can see the correct URL There.

Can anyone help me? Why the URL is correct only in the sitemap.

See Image

Thank you.

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
user12414491
  • 97
  • 12

2 Answers2

1

I found the problem.

link {
    skipControllerAndAction = 1
}

There is a skipControllerandAction in my news setup. I have removed this and now it working well.

Thanks!!

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
user12414491
  • 97
  • 12
0

The above solution (from the previous answer) works in me - remove/comment the skipControllerAndAction:

link {
    #skipControllerAndAction = 1
}