news: Fix category link in both breadcrumb and menu#4984
Merged
CaMer0n merged 4 commits intoe107inc:masterfrom Apr 4, 2023
Merged
news: Fix category link in both breadcrumb and menu#4984CaMer0n merged 4 commits intoe107inc:masterfrom
CaMer0n merged 4 commits intoe107inc:masterfrom
Conversation
|
Code Climate has analyzed commit 1d1f4d0 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 75.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 34.7% (0.0% change). View more on Code Climate. |
Member
|
Excellent! Thanks @Deltik |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
newsplugin category breadcrumb in an effort to fix the category list in thenews_categoriesmenu.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.idcannot mean both the category ID and the news item ID.How Has This Been Tested?
Manually, I checked both the
news_categoriesmenu behavior and the breadcrumb behavior on allnewsSEF variants at/e107_admin/eurl.php?mode=main&action=config.Automated tests for the
newsplugin category SEF URLs are in the new filee107_tests/tests/unit/plugins/news/PluginNewsTest.php.Types of Changes
Checklist