-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.3] Several fixes to single tag view from com_tags #39113
Conversation
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
Co-authored-by: Brian Teeman <brian@teeman.net>
Then I misunderstood that, sorry. I see the problem from your point of view. But as a user I would be ok to know that there is nothing to see. Without 404 error message. |
I have tested this item ✅ successfully on 80c6c27 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39113. |
I've restored @jamfx 's test result in the issue tracker since the commits which have invalidated the test count were just clean branch updates. @Hackwar Please avoid unnecessary branch updates since that invalidates the test counter in the issue tracker and so makes it harder for us to find the PRs which have 2 good tests and causes additional work for restoring the test result. Thanks in advance. |
I have tested this item ✅ successfully on 47f9758 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39113. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39113. |
I have tested this item ✅ successfully Please give us customizable css styles for the image and the title. At the moment you need to customize the raw img and h1 statements with impact for the whole webpage. thanks This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/39113. |
RTC is still valid because the change after that was just replacing 3 nested if statements by one with the combined condition, which is ok for me by review. |
Thank you Hannes @Hackwar for the PR! |
Summary of Changes
This is the result of a codereview of the tag view from com_tags. There are several changes in here, which fix broken behavior in this one view and clean up code. I'm doing my best to document everything in here... This is a complex change, but unfortunately I don't see how to simplify this and/or split this up into several PRs. For all existing sites, this PR will not result in new errors, but rather fix existing issues.
Let's start into the changes in here:
$this->item
in the view class contains an array of tags and up till now only the first tag was checked against the menu item, etc. Now all the tags are checked.$item
attribute wasn't defined.$tag
at the same time wasn't used. With$item
being initialised as an array, we can remove a bunch of checks. At the same time we can now properly throw a 404 if the number of tag IDs doesn't match the number of tags found in the database matching these IDs. (we might want to rewrite theTagModel::getItem()
method to use a single query instead of loading each tag separately with a Table call...)Testing Instructions
Basically there should be no difference on an existing site between the current code and after applying this PR.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed