Fec-cms: Court case page serve error for ids 11391 and 11445

Created on 1 Dec 2020  路  1Comment  路  Source: fecgov/fec-cms

Summary

When court case pages were inserted into Wagtail, there are two IDs that error when loading: 11391 and 11445. This was discovered when scraping the Wagtail CMS pages for the Wagtail.

We should consider either deleting those page IDs or making them not live so that the scraper tool will bypass it.

How to Reproduce

  • Get the latest CMS database on your local machine
  • Perform a scrape: fec/manage.py index_pages

    • The scraper will error with the following error details below:

Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(*args, **options) File "/Users/xxx/dev/fec-cms/fec/search/management/commands/scrape_cms_pages.py", line 75, in handle "path": BASE_URL + page.url, File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/wagtail/core/models.py", line 828, in get_url url_parts = self.get_url_parts(request=request) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/wagtail/core/models.py", line 785, in get_url_parts 'wagtail_serve', args=(self.url_path[len(root_path):],)) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/urls/base.py", line 90, in reverse return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)) File "/Users/xxx/.pyenv/versions/fec-cms-dev-377/lib/python3.7/site-packages/django/urls/resolvers.py", line 673, in _reverse_with_prefix raise NoReverseMatch(msg) django.urls.exceptions.NoReverseMatch: Reverse for 'wagtail_serve' with arguments '('legal-resources/court-cases//',)' not found. 1 pattern(s) tried: ['((?:[\\w\\-]+/)*)$']

Bug Needs prioritization

Most helpful comment

  • Epstien (11391 and 11392 ) --AND-- Virginia Society for Human Life (11445 and 11446) were scraped twice because there are empty h2s on their transition alpha entries, leaving blank slugs in the core alpha CSV file.
  • We just needed to delete, 11391 and 11445 as @patphongs mentions above.
  • This tree error made it impossible to navigate to pages 5 of 10 or 6 of 10 in the Wagtail admin to access the pages for deletion so I just pasted in browser: https://www.fec.gov/admin/pages/11445/delete/ and https://www.fec.gov/admin/pages/11391/delete/ to delete and restore access to all 10 court-cases admin pages.

>All comments

  • Epstien (11391 and 11392 ) --AND-- Virginia Society for Human Life (11445 and 11446) were scraped twice because there are empty h2s on their transition alpha entries, leaving blank slugs in the core alpha CSV file.
  • We just needed to delete, 11391 and 11445 as @patphongs mentions above.
  • This tree error made it impossible to navigate to pages 5 of 10 or 6 of 10 in the Wagtail admin to access the pages for deletion so I just pasted in browser: https://www.fec.gov/admin/pages/11445/delete/ and https://www.fec.gov/admin/pages/11391/delete/ to delete and restore access to all 10 court-cases admin pages.
Was this page helpful?
0 / 5 - 0 ratings