-
-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Category menu and news list breaking on same page with frontend routing activated #2250
Comments
Im experiencing the same issue with active routeEnhancers, but i dont get the same error message. In my case somehow the detailAction is called an then caught by the handleNoNewsFoundError function. |
I ended up using two different routeEnhancers. One for the detail controller and one for all views with the list controller. Somehow news detail and category list where overwriting each other or something. routeEnhancers:
NewsDetail:
type: Extbase
extension: News
plugin: Pi1
limitToPages:
- 22
- 54
routes:
-
routePath: '/{news-title}'
_controller: 'News::detail'
_arguments:
news-title: news
defaultController: 'News::detail'
aspects:
news-title:
type: NewsTitle
News:
type: Extbase
extension: News
plugin: Pi1
limitToPages:
- 9
# - 22
- 23
- 26
- 14
routes:
-
routePath: '/seite-{page}'
_controller: 'News::list'
_arguments:
page: 'currentPage'
-
routePath: '/{category-name}'
_controller: 'News::list'
_arguments:
category-name: overwriteDemand/categories
# -
# routePath: '/{news-title}'
# _controller: 'News::detail'
# _arguments:
# news-title: news
-
routePath: '/{tag-name}'
_controller: 'News::list'
_arguments:
tag-name: overwriteDemand/tags
defaultController: 'News::list'
defaults:
page: '0'
aspects:
# news-title:
# type: NewsTitle
page:
type: StaticRangeMapper
start: '1'
end: '100'
category-name:
type: NewsCategory
tag-name:
type: NewsTag
|
The above configuration does not solve the issue for me. Then again, as @jramke said, he does not have the same error message... |
I got the same problem, it did cost me really a lot of time. The order is important and the aspect types matter. This is my configuration which works without problems:
If the order is changed and/or the aspect type it won’t work for either title, category or tag. I think I really tried every combination. |
That made me very hopeful, but it still doesn't work for me. Environment (updated)
|
Then maybe something is different between TYPO3 11 and 12. What exactly doesn’t work in your case? Did you adjust the ids in limitToPages? It seems that the order is really important and also the used aspect types. Before I switched to news 11 and non-composer mode (I think the important change is update news 10 to 11) ordering and aspect type didn’t matter, no issues. |
I just realized my config has one issue: in case of a link with no news/category/tag matching 404 is not fired but message „no news found“. So it seems the system filters news list with no found category or tag. It seems to be a news ext issue in the repository and no core issue. |
I did adjust |
After updating news from 11.3 to 11.4.1 I had to change the ordering again to get everything working. Here my current working setup:
|
I am facing same problem in typo3 version 12.4.x . Any solution on this please suggest? |
Oh great, finally a solution that worked for me! Many thanks @Kayu84 And I agree that this seems like a necessary default setting (which is why I'm leaving this report open for now). |
Bug Report
Current Behavior
I have a page with two news plugins installed: the category menu (CategoryList) and the standard news list (Pi1). When I click on a category, I get the following error:
The controller "News" is not allowed by plugin "CategoryList". Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
When there's no frontend routing configuration (i.e. no speaking URLs), this does not happen.
I have the following frontend routing configuration:
I have tried the configuration from the documentation: https://docs.typo3.org/p/georgringer/news/11.2/en-us/Tutorials/BestPractice/Routing/Index.html#basic-setup-including-categories-tags-and-the-rss-atom-feed and many other variants, all to no avail.
Digging into the Extbase RequestBuilder, where the error happens, I can see that the default values are as expected (pointing to the CategoryController) but they are overridden by the query parameters (which point to the "list" action of the NewsController).
I'm not sure whether this is an Extbase issue, a routing (configuration) issue or really a "news" issue, but at least the extension documentation seem to indicate that two plugins can co-exist on the same page, whereas my current experience shows the contrary.
Expected behavior/output
Being able to the the category menu and the news list on the same page. The category menu should show the active category and the news list should be filtered according to the selected category.
Environment
The text was updated successfully, but these errors were encountered: