Skip to content
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

Wagtail Bug: Document Page template pages are showing up in search results #5918

Closed
Tracked by #104
dorothyyeager opened this issue Sep 20, 2023 · 9 comments · May be fixed by #5922
Closed
Tracked by #104

Wagtail Bug: Document Page template pages are showing up in search results #5918

dorothyyeager opened this issue Sep 20, 2023 · 9 comments · May be fixed by #5922
Assignees
Labels

Comments

@dorothyyeager
Copy link
Contributor

Summary

When searching for a PDF document, the page used to feed that PDF into a document feed is showing up in search results. That's not good because those pages contain no content and will confuse users.

Example: Enter "shutdown" into global search

This page and others like it appear: https://www.fec.gov/about/reports-about-fec/agency-operations/fec-plan-for-agency-operations-in-the-absence-of-the-fiscal-year-2024-appropriation/

image

What should have happened?

It would be better if the document feed page associated with that document appeared: https://www.fec.gov/about/reports-about-fec/agency-operations/

Alternatively, it would work OK if the PDF associated with the page was included on the document page: https://www.fec.gov/resources/cms-content/documents/FY2024-Shutdown-Plan-07-27-2023.pdf

Frequency

Since site search improved

How to Reproduce

Enter a term like "shutdown" into global search and click results that aren't PDFs.

Device, browser, etc

Happened on Chrome

Screenshots

Above

Misc

@dorothyyeager is available to pair or answer questions about what needs to show up.

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Sep 20, 2023

@dorothyyeager @JonellaCulmer. Three options below:

1) Can we just link the title like this?:

doc_title_linked

2) Or do you want to add the extension and size and link the extension, like this?:

file_extension_linked2

3) Or both, or something else?

@dorothyyeager
Copy link
Contributor Author

@johnnyporkchops I'll defer to @JonellaCulmer but I am good with either of those options. It seems like just the link is less work and gets the job done, so that's my vote.

@JonellaCulmer
Copy link
Contributor

@johnnyporkchops @dorothyyeager @AmyKort I can mock something up if we want these pages to have the document links on them instead of linking directly to the document from the global search, which is my preference. We already have an icon in the global search that suggests what customers are clicking on is a document.

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Sep 21, 2023

@JonellaCulmer , the only way to force a search-result webpage-link to go to a link to a document (or any other address) is to redirect it.

For the pages with the document link, we can also link from the Category button above to a filtered parent:
Example: /about/reports-about-fec/oig-reports/?category=inspection+or+special+review+report&year=2023
link_category_btn

@JonellaCulmer
Copy link
Contributor

@johnnyporkchops What's the level of effort on the redirects? I think it would be cleaner for customers to click on the link in the search and go directly to the PDF. As you said, these pages were not intended to be seen.

@johnnyporkchops
Copy link
Contributor

johnnyporkchops commented Sep 22, 2023

@JonellaCulmer, We might want to ask @dorothyyeager because redirects are her expertise, but it would mean creating about 420 redirects and then having to create a new redirect every time a new document is created. There is no way to do a global redirect pattern for these pages because the file name is different than the document/page title.

While it does represent an extra click to get to the document from a search result, the interim step is not totally useless because it orients the user to where they are in the ecosystem of Reports about the FEC and shows the same info you would get when using the search filters there (date, file size, category, file-type). It also gives the user a path to search other related documents if thats not the one they wanted.

Although the pages were not originally meant to be seen, the DocumentPage template was created with some foresight (building some fields into the template) We just need to add the others.

@JonellaCulmer
Copy link
Contributor

@johnnyporkchops Here's the mockup for the intermediary step while we work on the longer term fix.

Screen Shot 2023-09-27 at 5 29 22 PM

@dorothyyeager @AmyKort
The current plan for the longer term fix would be to explore the removal of document pages from the global search results or redirect them and @johnnyporkchops will spend some time during innovation exploring the options. The end goal would be to bypass these document pages and go directly to PDFs. So even if we implement this intermediary step, we'll later remove the extra click and customers won't lose any time.

@johnnyporkchops
Copy link
Contributor

  • We can create a sitemap for all these documents so the documents are indexed instead of the webpages. [DRAFT] Sitemaps for reports and FECForms - working prototypes #5958
  • We would have to make all the docment pages prvate so they do not show up in Wagtail sitemap
  • May need to ask search.gov to manually remove the pages already in the index. Or since they all have a path reports-about-fec/<section>/<page> , we may be able to ask search.gov to put a setting on their dashboard to exclude these paths. But we do not want to exclude the section parent, just the child pages.

@JonellaCulmer
Copy link
Contributor

Closing for now, work has been merged to fix links to documents. Longer term issues to link directly to documents from search and bypass these pages entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants