Closed Bug 763307 Opened 12 years ago Closed 11 years ago

Kuma: Add an option to filter out redirect pages when listing all pages

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fs, Unassigned)

References

Details

(Whiteboard: testday)

See https://developer-new.mozilla.org/en-US/docs/all

Might be worth filtering out redirect pages here as the whole list is crowded with them.
Version: Kuma → unspecified
Component: Website → Landing pages
Blocks: 803185
I guess this is easy to fix since we have the is_redirect field now.

I don't have the time to test it or write a PR currently, but how about adding the following to
https://github.com/mozilla/kuma/blob/master/apps/wiki/models.py#L379

docs = self.filter(is_template=0, is_redirect=0).
            exclude(slug__startswith='User:',
                    slug__startswith='User:Talk',
                    slug__startswith='Talk:').
            order_by('title')

These filters are proposed in bug 803185 as well and would help cleaning up our /docs/all/ page as a first step.

Low hanging fruit, David? ;-)
Do we always want to exclude these pages in the list?  Sheppy?
(In reply to David Walsh :davidwalsh from comment #2)
> Do we always want to exclude these pages in the list?  Sheppy?

Yes, we do.
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/de71cd28022c935e425b8534ffe4fcd211e778bf
fix bug 763307 - Remove templates and redirects from lists

https://github.com/mozilla/kuma/commit/a88b471d30f9a28e5d57040a2590784f91c155d5
Merge pull request #772 from darkwing/list-redirects-763307

fix bug 763307 - Remove templates and redirects from lists
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
verified fixed https://developer.allizom.org/en-US/docs/all
Status: RESOLVED → VERIFIED
On https://developer.mozilla.org/en-US/docs/all the first page "parent" is a redirect:
https://developer.mozilla.org/en-US/docs/Core_JavaScript_1.5_Reference/Global_Objects/Object/__parent 

On https://developer.mozilla.org/de/docs/all the first page "-moz-border-radius" is a redirect:
https://developer.mozilla.org/de/docs/CSS/-moz-border-radius

Reopening.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Fixed long time ago. Works for me now.
Status: REOPENED → RESOLVED
Closed: 12 years ago11 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.