news: Fix category link in both breadcrumb and menu #4984
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
These changes fixed individual symptoms, but not the root cause:
news
plugin category breadcrumb in an effort to fix the category list in thenews_categories
menu.Description
This change reverts both failed fixes and actually addresses the root cause: When rendering the category list, read out the
category_id
, ande_news_category_item::sc_news_category_url()
should be passing incategory_id
, notid
.id
cannot mean both the category ID and the news item ID.How Has This Been Tested?
Manually, I checked both the
news_categories
menu behavior and the breadcrumb behavior on allnews
SEF variants at/e107_admin/eurl.php?mode=main&action=config
.Automated tests for the
news
plugin category SEF URLs are in the new filee107_tests/tests/unit/plugins/news/PluginNewsTest.php
.Types of Changes
Checklist