-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
|category=+ and |category=- behavior inverted? Also, |category=+ gives no results. #164
Comments
Looks like DynamicPageList3/includes/Hooks.php Line 634 in 7c2bc69
|
Ah, so it is a database view that needed to be created. Also, I had a typo in my above report, to clarify, putting a minus ("-") in front of the category shows the output expected for the "+" value. In googling the error, I see it is also needed for DPL Wikimedia version as well (though neither extension page mentions this). That wikimedia-DPL section said the view would have needed to be created at the time of database creation (suggesting it couldn't be created later?) Yet I also found a DPL third-party reference to just creating this view after the fact (and that not having this may cause category:none to fail also, which I will test). Also, would it be possible for DPL3 to give a similar output error/warning to the one given in that followthescore site link, if that needed db view does not exist, so users get an explanation and potential remedy when this doesn't functions as expected? |
And, should I request this view be created (if it can be created after the fact)? Though I may way to do this until after I have test the rest of the provided examples, that way I can better know which of these require the view, to mark them as such. It seems odd to have an extra requirement to functionality not stated on the extension page. |
I have now created the VIEW on Miraheze. It now seems to work (as long as ordermethod is not using category as well) |
I have recently encountered this issue as well. Even testing on an empty wiki I was able to reproduce this error, although I should note I am using MediaWiki 1.35 and DPL 3.3.5 so do not know how it works on the most recent versions. In trying to figure out what was causing the issue I discovered that the generated SQL returned a query which included DynamicPageList3/includes/Query.php Lines 1785 to 1799 in 63d5a9d
I discovered that if I expanded the category array first, and passed this array the problem appears to be resolved. My code (which may be somewhat hacky) is below:
I suspect this is not the best way to fix the issue, but in my limited testing, it does look like it is working. Hopefully, this helps anyone who is looking for a temporary fix to this problem. |
DynamicPageList3 version: 3.4.5
MediaWiki version: 1.37.2 (Miraheze)
PHP version: 7.4.28
TLDR: Problem observed directly here:
https://dpl3.miraheze.org/wiki/User:FrozenPlum/Sandbox/Issues
List of steps to reproduce (step by step, including full links if applicable):
What happens?:
No results are displayed for
|category=+
. Using|category=-
the expected result for|category=+
(categories specified in the headings) are included in the result, the direct opposite of what the manual text states. I gather this has been broken for quite some time before you took over the extension, since the old manuals had the same stated outcome but no actual working result pages.What should have happened instead?:
|category=+
should show the result stated in the example given in the manual, or the behaviour removed (showing category headings in the result is useful, but not terribly practical when the result appears multiple times in the output if in multiple categories)|category=-
should be removed because the stated behaviour is the default anyhow, thus is redundant.Browser information, screenshots and other applicable information:
Not related, happens irregardless of browser
The text was updated successfully, but these errors were encountered: