Skip to content

fix: repair broken form submit handler and restore Clear Filters function#443

Open
ckprojects77 wants to merge 1 commit into
komalharshita:mainfrom
ckprojects77:fix/clear-filters-button
Open

fix: repair broken form submit handler and restore Clear Filters function#443
ckprojects77 wants to merge 1 commit into
komalharshita:mainfrom
ckprojects77:fix/clear-filters-button

Conversation

@ckprojects77
Copy link
Copy Markdown

Summary

The Clear Filters button on the Find Project page was completely non-functional. The root cause was a duplicate nested fetch block inside the form submit handler in script.js that caused a JavaScript syntax error, crashing the entire script before any event listeners could register including the Clear Filters click handler. Fixed by removing the duplicate broken fetch block and replacing the entire submit handler with a single clean version.

Related Issue

Closes #409

Type of Change

  • Bug fix — resolves a broken behaviour

What Was Changed

| static/script.js | Removed duplicate nested fetch block inside catch handler that was causing a syntax error and preventing all event listeners from registering.

How to Test This PR

  1. Clone this branch: git checkout fix/clear-filters-button
  2. Install dependencies: pip install -r requirements.txt
  3. Run the app: python app.py
  4. Open http://127.0.0.1:5000
  5. Fill in Experience Level, Area of Interest, Time Availability
  6. Click Clear Filters
  7. All fields should reset to empty default state

Test Results

Frontend only fix no backend tests affected.

Screenshots

Before: Clicking Clear Filters did nothing
After: All fields reset correctly on click

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: fix/clear-filters-button
  • I have not introduced any console.log() debug statements
  • I have not modified files outside the scope of the linked issue
  • If I changed the UI, I tested it at 375px and 1280px

Notes for Reviewer

This is a pure JavaScript fix in static/script.js. No Python backend files were modified. The duplicate fetch block was introduced by a previous contributor and was breaking the entire script execution.

…tionality fixes komalharshita#409

Signed-off-by: chaitanya kumari <chaitanyakumarichalla099@gmail.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@ckprojects77 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working type:accessibility ui and removed type:bug Something isn't working gssoc-2026 labels May 22, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: "Clear Filters" button does nothing when clicked on Find Project page in DevPath markdown

1 participant