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

Indexing: A site submitted via Quick Add but awaiting approval, then submitted again via Verified Add, won't be indexed until moderator approval #67

Closed
m-i-l opened this issue Jul 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@m-i-l
Copy link
Contributor

m-i-l commented Jul 3, 2022

Normally when a site is added via Verified Add it is indexed within 30 mins or so (depending on how long it takes to index). If a site is submitted via Quick Add first then a Verified Add also goes straight through, as long as the Quick Add process is complete. Conversely a Verified Add first followed by a Quick Add is also detected and handled. The issue here is a Quick Add which is still in progress first, and then a Verified Add before the moderator approval which completes the Quick Add process.

In this case the Verified Add was successful, but it wasn't indexed because it was awaiting moderator approval. The user also reported a 500 Server Error on completing payment, which I think is related. Also, the moderator approval reset the api_enabled, indexing_frequency and indexing_page_limit values to those for Quick Add rather than Verified Add, so they had to be restored to the Verified Add values.

Need to catch this combination and make sure the Verified Add fully overrides the Quick Add even if the Quick Add is incomplete.

For reference, the server error logs were:

[01/Jul/2022:19:10:18 +0000] "GET /admin/checkout/create-checkout-session/ HTTP/1.0" 200 83
...
[Fri Jul 01 19:11:59.787694 2022] [wsgi:error] [pid 10:tid 140074167523072] [client 172.18.0.1:45574]     f"The view function for {request.endpoint!r} did not", referer: https://checkout.stripe.com/
[Fri Jul 01 19:11:59.787716 2022] [wsgi:error] [pid 10:tid 140074167523072] [client 172.18.0.1:45574] TypeError: The view function for 'add.verified_success' did not return a valid response. The function either returned None or ended without a return statement., referer: https://checkout.stripe.com/
...
[01/Jul/2022:19:11:59 +0000] "GET /admin/add/success/?session_id=...
@m-i-l m-i-l changed the title Indexing: A site submitted via Quick Add and then Verified Add won't be indexed until moderator approval Indexing: A site submitted via Quick Add but awaiting approval, then submitted via Verified Add, won't be indexed until moderator approval Jul 3, 2022
@m-i-l m-i-l changed the title Indexing: A site submitted via Quick Add but awaiting approval, then submitted via Verified Add, won't be indexed until moderator approval Indexing: A site submitted via Quick Add but awaiting approval, then submitted again via Verified Add, won't be indexed until moderator approval Jul 3, 2022
@m-i-l m-i-l added the bug Something isn't working label Jul 9, 2022
m-i-l added a commit that referenced this issue Sep 11, 2022
@m-i-l
Copy link
Contributor Author

m-i-l commented Sep 18, 2022

The new database schema and Add Site workflow now successfully traps this. If you submit a site as a Basic listing (formerly Quick Add), and the moderator hasn't reviewed, and you then try to resubmit as a Full listing (formerly Verified Add), you can't continue and get the message "Domain ... is currently pending moderator review." Once a moderator has reviewed (assuming they Approve) you can then resubmit for a Full listing.

@m-i-l m-i-l closed this as completed Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant