? ? ? Pending

User tests: Successful: Unsuccessful:

avatar jurihahn
jurihahn
27 Sep 2018

Pull Request for Issue #22406 .

Summary of Changes

Option for Disable Hits counter increment

Testing Instructions

  1. Open an article and check if the hits do increase
  2. Go to content options and Set "Save Hits" to "NO"
  3. Open an article and check if the hits do not increase

Expected result

If disabled, article hits do not increase

Actual result

article hits do not increase always

Documentation Changes Required

no?

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar jurihahn jurihahn - open - 27 Sep 2018
avatar jurihahn jurihahn - change - 27 Sep 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Sep 2018
Category Administration com_content Language & Strings Front End
avatar effrit
effrit - comment - 28 Sep 2018

Cool, thanks! Tested successfully. What need to do to approve testing?

avatar jurihahn jurihahn - change - 28 Sep 2018
Labels Added: ? ?
avatar jurihahn
jurihahn - comment - 28 Sep 2018

@effrit go to Joomla Issue Tracker and click "Test this"
https://issues.joomla.org/tracker/joomla-cms/22413

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Sep 2018

@effrit if needed:

  • open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as successfully
  • hit "submit test result"
avatar effrit
effrit - comment - 28 Sep 2018

I have tested this item successfully on ea5a308


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar effrit effrit - test_item - 28 Sep 2018 - Tested successfully
avatar SharkyKZ
SharkyKZ - comment - 28 Sep 2018

If accepted, shouldn't this be done for all items using hits functionality?

avatar jurihahn
jurihahn - comment - 28 Sep 2018

@SharkyKZ i can do this in future PR's

avatar effrit
effrit - comment - 28 Sep 2018

@SharkyKZ, which one? Examples?

avatar SharkyKZ
SharkyKZ - comment - 28 Sep 2018

Contacts, newsfeeds and tags. Categories also have code for hit functionality but it doesn't seem to get executed. Was thinking that, if this is added to categories, the strings should differentiate between content types. But if not, they should be made global.

Also realized hitcounts can be easily controlled by a plugin. This is already done with vote plugin to prevent increasing count when voting. That said, does an option really needs to be added? Plugin could give more control such as suggested in the forum https://forum.joomla.org/viewtopic.php?f=706&t=965788.

avatar effrit
effrit - comment - 28 Sep 2018

@SharkyKZ, it must be plugin AFTER this implementation done. So u will can use this BD field without standard mad increment IF u need accurate hits counter.
And read about others request - about DB cache. With this implementations they also will be satisfied. Because if you have thousand of articles standard hits is just pain for nothing...
So this modifications is simple and useful solution for 2 issues.

avatar SharkyKZ
SharkyKZ - comment - 28 Sep 2018

@effrit No, the plugin can easily disable hitcount by setting hitcount var to 0:

public function hit($pk = 0)
{
$input = JFactory::getApplication()->input;
$hitcount = $input->getInt('hitcount', 1);
if ($hitcount)
{
$pk = (!empty($pk)) ? $pk : (int) $this->getState('article.id');
$table = JTable::getInstance('Content', 'JTable');
$table->load($pk);
$table->hit($pk);
}
return true;
}

This allows manipulation requested in the forum thread. E.g. to prevent same user from increasing the count twice or to disable robot hits.

avatar effrit
effrit - comment - 28 Sep 2018

@SharkyKZ, even so, why i need install the plugin if i just dont need this counter?
i guess i am not only one who never use it.

avatar dmitrystas
dmitrystas - comment - 28 Sep 2018

I have tested this item successfully on ea5a308


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar dmitrystas dmitrystas - test_item - 28 Sep 2018 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Sep 2018
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Sep 2018

Ready to Commit after two successful tests.

avatar jurihahn jurihahn - change - 28 Sep 2018
Labels Added: ?
avatar Quy
Quy - comment - 28 Sep 2018

I have tested this item successfully on 19dfbb3


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar Quy Quy - test_item - 28 Sep 2018 - Tested successfully
avatar effrit
effrit - comment - 28 Sep 2018

I have tested this item successfully on 19dfbb3


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar effrit effrit - test_item - 28 Sep 2018 - Tested successfully
avatar dmitrystas
dmitrystas - comment - 28 Sep 2018

I have tested this item successfully on 19dfbb3


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar dmitrystas dmitrystas - test_item - 28 Sep 2018 - Tested successfully
avatar effrit
effrit - comment - 29 Sep 2018

Hey, what else we need to do?
Who must implement changes requested by brianteeman?

avatar infograf768
infograf768 - comment - 29 Sep 2018

The PR is RTC. The changes were done. Nothing else to do than wait for @mbabker to merge. :)

avatar SharkyKZ
SharkyKZ - comment - 29 Sep 2018

Last commit (69ea8a2) doesn't work right. If you want to use type-safe comparison, add filter to form field or at least cast value as integer.

Also, since string remains generic can you move it to global language files?

avatar infograf768 infograf768 - change - 29 Sep 2018
Status Ready to Commit Pending
Labels
avatar infograf768
infograf768 - comment - 29 Sep 2018

Set back to pending until tested new code


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar Quy
Quy - comment - 29 Sep 2018

I have tested this item successfully on 22c8e61


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar Quy Quy - test_item - 29 Sep 2018 - Tested successfully
avatar dmitrystas
dmitrystas - comment - 29 Sep 2018

I have tested this item successfully on 22c8e61


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar dmitrystas dmitrystas - test_item - 29 Sep 2018 - Tested successfully
avatar Quy Quy - change - 29 Sep 2018
Status Pending Ready to Commit
avatar Quy
Quy - comment - 29 Sep 2018

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22413.

avatar mbabker mbabker - close - 2 Oct 2018
avatar mbabker mbabker - merge - 2 Oct 2018
avatar mbabker mbabker - change - 2 Oct 2018
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-10-02 16:12:30
Closed_By mbabker
Labels

Add a Comment

Login with GitHub to post a comment