When I am trying to leave a feedback in any page, this error comes:
[....] Caught exception of type Error
Description
Details
Related Objects
Event Timeline
it is solved when I installed AbuseFilter extension.
Seems like these two extensions are dependent
[....] Caught exception of type Error
Can you paste the full error/stack trace? You should be able to get that if you temporarily comment out the AbuseFilter inclusion in LocalSettings.php and set $wgShowExceptionDetails = true;
AbuseFilter is supposed to be supported by AFTv5 but not a hard dependency.
Hello, I have a similar error with ArticleFeedbackv5.
When the AbuseFilter plugin is enabled, the following message is displayed when I want to leave feedback:
Exception caught: Call to private method MediaWiki\Extension\AbuseFilter\FilterUser::getUser() from scope ApiArticleFeedbackv5
When I disable AbuseFilter I get this message:
Exception caught: Class "MediaWiki\Extension\AbuseFilter\AbuseFilterServices" not found
What could be wrong?
@Pawelk89: Please provide exact versions (git revisions) of MediaWiki, AbuseFilter, and ArticleFeedbackv5
It seems like there are two separate problems here:
- AbuseFilter-related code in AFTv5 running even when AbuseFilter isn't available
- An AbuseFilter-related method used when AF is available no longer being public in the AF codebase
I'll try to come up with some kind of a quick hack for this...
Namedropping @Daimona and rEAFFd8fe3acd7c74: Avoid deprecated $wgAbuseFilterCustomActionsHandlers and fix up
This one should be easy to fix with an ExtensionRegistry::isLoaded() conditional, I think.
- An AbuseFilter-related method used when AF is available no longer being public in the AF codebase
Yup, getUser was made private, you can use getUserIdentity as a direct replacement to obtain a UserIdentity, although you may actually want to use the Authority interface (via getAuthority()) instead.
Change 891595 had a related patch set uploaded (by Jack Phoenix; author: Jack Phoenix):
[mediawiki/extensions/ArticleFeedbackv5@master] Fix up the AbuseFilter integration in ApiArticleFeedback to not throw out fatals
Thank you for your help. I installed this patch and the errors no longer appear.
Comments are now saved without any errors.
However, there is another problem.
On pages:
Special:ArticleFeedbackv5
Special:ArticleFeedbackv5Watchlist
It is possible to mark feedback as:
- Useful
- Solved
- No action required
- Hide this entry
Unfortunately, when I click on these links, I get the following error:
Exception caught: A database query error has occurred. This may indicate a bug in the software.
Change 891955 had a related patch set uploaded (by Jack Phoenix; author: Jack Phoenix):
[mediawiki/extensions/ArticleFeedbackv5@master] Even more very important functional fixes for mission-critical functionality
In the future, when reporting an error like this, please try to include the full stack trace (which, of course, requires that $wgShowExceptionDetails = true; is set in the wiki's LocalSettings.php). I think in this case the full error wasn't displayed on the web UI, but if you open your browser's developer tools console (by pressing F12 on Firefox; Chrom(e|ium) and its forks use a more complicated shortcut that I can never remember), choose the "Network" tab and inspect the most recent request, or if there is nothing shown, you reload the page and take the same steps that triggered the error previous in hopes of triggering it again while the browser's web developer tools' "Network" tab is chosen, the api.php response should contain a more detailed backtrace, or at least enough of it for a developer to try to figure out what's going on. If you have PHP's error logging enabled, I believe these kind of errors also get logged there as well.
For me and for this particular problem, the details you provided were, however, sufficient enough that I managed to find a bunch of problems, which are hopefully fixed by the follow-up patch linked by gerritbot above. Please do give it a try. (I do want to note that I tested these fixes only on a 1.39 box; though AFTv5's extension.json requires 1.38.0+, I'm simply unable to support the non-LTS releases; keeping a bunch of extensions and skins working on the LTS releases is time-consuming and exhausting as-is, especially with random core changes subtly breaking stuff...)
You are great. Now everything works.
I have the last question. Is it possible to hide or mask user's IP addresses on the following pages?
Special:ArticleFeedbackv5
Special:ArticleFeedbackv5Watchlist
Change 891595 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Fix up the AbuseFilter integration in ApiArticleFeedback to not throw out fatals
Change 891955 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Even more very important functional fixes for mission-critical functionality
Thank you, I try to be.
Now everything works.
Cool, I'll go give the patches +2 to land 'em to master.
I have the last question. Is it possible to hide or mask user's IP addresses on the following pages?
Special:ArticleFeedbackv5
Special:ArticleFeedbackv5Watchlist
Depends on the definition, but basically the answer is "not really". IP addresses are used to identify non-registered/logged-in users in MediaWiki in general, so that's what AFTv5 does. Of course there's the WMF "IP masking" initiative, and I guess in time AFTv5 has to support that, but it currently does not.
I'll close this task now as RESOLVED as all the mentioned issues have been fixed and the fixes should be landing to master any moment now.
Please feel free to open a new task if and when you find further bugs (given the sheer size of the codebase, I'm sure there are some!).