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

Fix backend error when there is no query supplied #6423

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

tedw87
Copy link
Contributor

@tedw87 tedw87 commented Oct 22, 2024

When you add a listing block with no criteria, it will give a backend error.

Fixes #3839

Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 61ed8ac
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/671f56dd946c5e000856c260

@davisagli
Copy link
Member

I tried to reproduce the bug this is trying to solve, but I don't see the "No query supplied" exception. What am I missing?

@tedw87
Copy link
Contributor Author

tedw87 commented Oct 25, 2024

Hi @davisagli, you can reproduce this by adding a listing-block and just save it with no criteria selected. Then refresh that page and you should see the error on the backend console.
I will share here all the issues that are pointing to this problem:
#3839
#3866
#3474

@davisagli
Copy link
Member

you can reproduce this by adding a listing-block and just save it with no criteria selected. Then refresh that page and you should see the error on the backend console.

Sorry if I'm being dumb, but this is exactly what I tried and I do not see the error. What version of the backend are you running and how did you start it? And are you running Volto from this branch with make start, or some other version?

@tedw87
Copy link
Contributor Author

tedw87 commented Oct 28, 2024

So I tested in Volto 18 (main branch) and backend I started with make backend-docker-start, and in Volto I make a new page, add a Listing block with no criteria selected. I save the block and there is no error at this point, error apears when i refresh the page where i created the listing block.

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm not sure why I couldn't reproduce the error the other day.

@davisagli davisagli merged commit 8fee114 into main Oct 29, 2024
68 checks passed
@davisagli davisagli deleted the no-querry-error-in-backend branch October 29, 2024 05:32
sneridagh added a commit that referenced this pull request Oct 29, 2024
* main:
  Fix backend error when there is no query supplied (#6423)
sneridagh added a commit that referenced this pull request Oct 30, 2024
* main: (111 commits)
  Moved `applyBlockDefaults` one component up so the style is computed correctly (#6451)
  Fix useSelector is returned a different result when called with the s… (#6450)
  Fix page changes not being announced by assistive technology when navigating using the client-side router (#5288)
  BlockStyleWrapper aware of block themes (#6445)
  A11y: Wrap ToC Block within nav tag (#6084)
  Fix backend error when there is no query supplied (#6423)
  Added upgrade guide fix for HMR (#6446)
  Fix CSS lint in Volto Slate (#6444)
  Release 18.0.0-alpha.47
  Release generate-volto 9.0.0-alpha.20
  Release @plone/scripts 3.7.0
  Release @plone/registry 2.0.0-alpha.0
  Improve @plone/registry release-it config
  `@plone/registry` as ESM module, move to TS, complete documentation (#6399)
  [Next.js] Better Vercel deployment (#6441)
  Replace all `yarn` appearences with `pnpm` (#6433)
  Add deprecation notices to the Upgrade guide (#6426)
  Clean up #6422 (#6443)
  Rename page title from Frontend to Volto UI (#6438)
  URL-Management control panel: Add missing translations (#6436)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Exception: No query supplied" in the listing block
3 participants