User tests: Successful: Unsuccessful:
Pull Request for Issue #40476 .
Right now, Joomla registers every call to the URL of a content item as a hit. However, there are cases where for example FeedBurner does HEAD requests to the URL, which isn't really a real request to get the content item. This PR filters the requests to only be registered as a hit when triggered by GET or POST.
Install the testing sample data and visit an article of your choice, for example "Content Component". See the hit counter. Request the same URL with a tool like Postman as a HEAD request.
The HEAD request is counted as a hit.
The HEAD request is not counted as a hit.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_contact com_content com_newsfeeds com_tags |
Labels |
Added:
PR-5.2-dev
|
The model and table do the actual work of registering the hit. The decision if the hit should be counted has to be done by the controller/view. Normally, the code should be unified to check this either in the controller or in the view and not one time in the controller and the other time in the view. I can't say which solution is the right one right now. In the end, you might want to use the model or table in another context (a JSON API or CLI code) and register that as a hit, which would then create problems when you have the additional checks in there.
Labels |
Added:
Feature
|
I have tested this item ✅ successfully on 98a9ed5
Works as described.
I have tested this item ✅ successfully on 98a9ed5
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
RTC
bug
Removed: Feature |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-08-26 12:12:31 |
Closed_By | ⇒ | pe7er |
Hi @Hackwar , can you eleborate what is the reason for doing these changes in the controller / view and not in the model or table hit function?