DynamicPageList3 icon indicating copy to clipboard operation
DynamicPageList3 copied to clipboard

|category=+ and |category=- behavior inverted? Also, |category=+ gives no results.

Open CrystalClearGal opened this issue 3 years ago • 5 comments

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):

  • Use the following statement with pages in both categories:
{{#dpl:
|category=+Countries in Europe¦Countries in North America
|headingmode=ordered
|ordermethod=category,firstedit
|noresultsheader=<br>''no result returned''
}}
  • Preview or save the page

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

CrystalClearGal avatar Apr 09 '22 05:04 CrystalClearGal

Looks like https://github.com/Universal-Omega/DynamicPageList3/blob/7c2bc69296bd1d4958c60d18cebe124cbb602bef/includes/Hooks.php#L634 needs ran for this (which it has never been on Miraheze it seems)

Universal-Omega avatar Apr 09 '22 23:04 Universal-Omega

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?

CrystalClearGal avatar Apr 11 '22 02:04 CrystalClearGal

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.

CrystalClearGal avatar Apr 11 '22 02:04 CrystalClearGal

I have now created the VIEW on Miraheze. It now seems to work (as long as ordermethod is not using category as well)

Universal-Omega avatar Apr 14 '22 21:04 Universal-Omega