View Issue Details

IDProjectCategoryView StatusLast Update
5312Composr alpha bug reportsGeneral / Uncategorisedpublic2023-02-21 00:30
ReporterPDStig Assigned ToPDStig  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Summary5312: Forums: Adding a new topic results in either 404 not found or POST parameter id having invalid integer
Descriptionditto ^
Additional InformationIt redirects to a URL with an undefined in it
TagsNo tags attached.
Attach Tags
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

PDStig

2023-02-21 00:02

administrator   ~7937

Issue was cns_forum.js was not properly re-writing the action attribute on the form due to recent changes made as recommended by esLint (now that we are doing strict type comparisons, the undefined variable which was being compared to null was failing an if condition).

PDStig

2023-02-21 00:07

administrator   ~7938

Additional note: This was a hard bug to spot as there were no JS calls on posting-form directly. I was able to locate the source by using the JavaScript mutationObserver on the form to monitor for changes to its attributes. And in the callback, I called console.error to produce a stack trace so I can locate what exactly was modifying the action attribute (and how).

Chris Graham

2023-02-21 00:15

administrator   ~7939

Whoops. I shouldn't have actually done that change, as ESLint didn't require it, I was just flooded in little issues and it looked like one of those issues. We actually are allowing type week checks against null in our JS codebase, presumably for this kind of issue.

PDStig

2023-02-21 00:25

administrator   ~7940

No worries. I simply just initialized the variable to null instead of undefined to fix the issue and keep type strict comparison in place. I can revert that and remove the type strict check if you wish.

Chris Graham

2023-02-21 00:30

administrator   ~7941

Your change is good.

Issue History

Date Modified Username Field Change
2023-02-20 22:29 PDStig New Issue
2023-02-20 22:29 PDStig Status Not Assigned => Assigned
2023-02-20 22:29 PDStig Assigned To => user4172
2023-02-21 00:00 PDStig Status Assigned => Resolved
2023-02-21 00:00 PDStig Resolution open => fixed
2023-02-21 00:02 PDStig Note Added: 0007937
2023-02-21 00:07 PDStig Note Added: 0007938
2023-02-21 00:15 Chris Graham Note Added: 0007939
2023-02-21 00:25 PDStig Note Added: 0007940
2023-02-21 00:30 Chris Graham Note Added: 0007941
2023-02-26 18:29 Chris Graham Category General => General / Uncategorised