User tests: Successful: Unsuccessful:
Resolved #19998
Pull Request for Issue # .
Status | New | ⇒ | Pending |
Category | ⇒ | com_tags Front End |
Labels |
Added:
?
|
The notice is still there. To test, install the demo. Remove green
tag from articles. On the frontend, access the page (the URL maybe different on your setup):
http://localhost/joomla-cms-staging/index.php/all-tags/green
@tonypartridge thank you very much for your efforts. With your call, I have uploaded the file and I am now visiting the tag pages on the web site. Let me observe it for a few hours on the logs because I don't exactly know which pages caused this error. I was receiving this error every day after the upgrade so I can tell you if it works or not within a few hours. Kind regards.
To reproduce, access a tag page that has no articles assigned to it on the frontend.
No need to be sorry! But you’re wrong ;). we were checking if the array was empty and if it was we were returning false. Now we return parent which is and empty array. Problemo solved.
On 27 Mar 2018, 17:03 +0100, Michael Babker notifications@github.com, wrote:
@mbabker commented on this pull request.
In components/com_tags/models/tag.php:@@ -87,6 +87,11 @@ public function getItems()
if (!empty($items)) {
if(!is_array($items))
$items = parent::getItems();
if (!is_array($items)) {
return $items;
}if (!empty($items)) {
// Whatever is in place now
}return $items;
That's the gist of what it should be. But there should also be something setting an error at some point in this case. Also, this block really shouldn't be commented out (it has been since com_tags was merged 5 years ago, seeing this now leads me to believe there's some other issue being masked, you say the parent is returning false, that means there was a database error caught in the parent method, why are we ignoring it?).
We just got into a major rabbit hole here. Sorry!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Well, that's better news then. But we still have the issue of the view ignoring errors to address at some point.
Good point! I’ll try and find time to look into that when things cool down, but this resolves the immediate issue. Thanks again for you input really appreciated!
On 27 Mar 2018, 17:08 +0100, Michael Babker notifications@github.com, wrote:
Well, that's better news then. But we still have the issue of the view ignoring errors to address at some point.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I have tested this and it works now. Thanks to all the contributors.
@hakanara please mark your test result here: https://issues.joomla.org/tracker/joomla-cms/20000
I have tested this item
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-03-29 11:53:50 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
Generally speaking, I agree with the author of the post, but everything happens a bit differently in life. I saw another interpretation that you can see in the article on the https://essaysservicesreviews.com/. Thanks for the post anyway, it was very interesting to read,
This should be fixed in a view class if possible, not a layout. Layouts
shouldn't have to validate data type, and this fix would have to be applied
by anyone with an override (so the dataset being used/injected isn't being
validated well enough; IIRC our models with getItems methods should only
return non-countables if in an error state).
On Mon, Mar 26, 2018 at 8:55 PM Tony Partridge notifications@github.com
wrote:
--