Implement Reset Hits feature to Weblinks#590
Implement Reset Hits feature to Weblinks#590joomdonation merged 8 commits intojoomla-extensions:5.x-devfrom
Conversation
|
@mahmoudmagdy1-1 thanks in advance |
|
i don't like where the button reset hit it is placed, it should be on the toolbar |
|
yes exaclty, cause i think it's much more "family feeling" |
bffe665 to
a0b3984
Compare
4a5327e to
3f2b489
Compare
|
The latest changes I've made changes the button position and it handles the cases that if the weblinks user have set their The build kept failing so I fixed it and force pushed the commits back to keep the commit history clean, is there an issue with that or that is fine? |
It should be able to handle this case now |
joomdonation
left a comment
There was a problem hiding this comment.
Thanks for working on this. There are some changes needed. See below:
src/administrator/components/com_weblinks/src/Controller/WeblinkController.php
Outdated
Show resolved
Hide resolved
src/administrator/components/com_weblinks/src/Controller/WeblinkController.php
Outdated
Show resolved
Hide resolved
src/administrator/components/com_weblinks/src/Controller/WeblinkController.php
Outdated
Show resolved
Hide resolved
src/administrator/components/com_weblinks/src/Model/WeblinkModel.php
Outdated
Show resolved
Hide resolved
|
Thanks for the feedback I really appreciate it, I just addressed the issues you mentioned, |
|
me and @joomdonation have had a discussion about this pull request, and we come to the conclusion that it would better, to put the reset hit button like it has been done for the banners component, sorry for my previuos comment to move the button on the toolbar i've forgot about banners |
|
Also, you made too many unnecessary docblock changes in the PR. Please revert all the changes you made to docblock in this PR. For example, for @param spaces, we use the following rules:
|
I didn't know about this, thanks for mentioning it, now after the latest changes I changed the implementation to match the banners component's reset
Sorry, I just reverted those changes, thanks for letting me know. |
|
i'm afraid you have removed too much needed files, please check |
Screencast.from.04-07-2025.09.54.15.AM.webmIt works for me, can you tell me what exactly is not working for you? |
|
Guess it is because you have old modified files left in your installation. Please check the modified files for your PR https://github.com/joomla-extensions/weblinks/pull/590/files , you removed the changes you made in model, controller classes, so the change was lost and won't work anymore. |
The old changes are no longer needed After debugging now from a fresh install I see why it doesn't work for you, The issue lies within the |
|
i can confirm it works fine |
|
@joomdonation please take a look when you have time |
src/administrator/components/com_weblinks/src/Field/HitsField.php
Outdated
Show resolved
Hide resolved
|
Thanks @mahmoudmagdy1-1 for your work. I expected to have server side code to reset hits of weblink item, not just a litle javascript code to reset value of hits input. By removing But maybe it is not that important to prevent that behavior, so we will accept this change for now. Thanks again and sorry for slow getting back to you, I'm quite busy these days. Looking forward to seeing other improvements from you. |
No problem, Yes I've noticed that but that's how is the reset button is implemented in other components, maybe we will fix this behavior in the future,
It's Okay, Thanks for taking the time to review and giving me feedback :) |





Pull Request for Issue #475 .
Summary of Changes
This pull request adds a "Reset Hits" feature to the Joomla Weblinks admin interface when editing a weblink. It adds a new button in the
Publishingtab to reset a weblink’s hit counter to zero.Screencast.from.03-25-2025.03.14.31.PM.webm
Testing Instructions
Expected result
Clicking "Reset Hits" when editing a weblink in the 'Publishing' tab sets the weblink’s hit count to 0.
Actual result
There was no option to reset the hits counter.
Documentation Changes Required