Tytan888 / CSSWENG-S11-G1

0 stars 0 forks source link

Delete Button not working (Admin view) #9

Closed rpineda26 closed 11 months ago

rpineda26 commented 11 months ago

💾 Description: In the admin view, all deletable objects (project, event, newsletter, etc.) cannot be deleted because the delete button is not working when clicked. This bug should've been introduced in the newer commits as the running live server based on an older version of the repository seems to be working fine. ⏰ Expected Outcome: Clicking the delete button should delete the object both in the frontend and in the database.

☎️ Actual Outcome: Clicking the delete button does nothing to the website and some errors are raised in the inspect tool of the browser. 🎶 Steps to Reproduce:

  1. Log in as admin
  2. Make sure the database is populated.
  3. Try to delete the object. image
Tytan888 commented 11 months ago

🛠️ Fix: The bug was caused by a small oversight when reusing code from other parts of the codebase. This was written down... 370604937_1033431897913558_2155529811407425426_n ...instead of this... 375212885_878343763565584_3190231195286442451_n ...causing a "cannot read properties of null" error to occur.

New Output/Behavior: image image The delete button for deleting elements now works as intended.