speechanddebate / tabroom

Tabroom.com Legacy Perl/Mason Code
https://www.tabroom.com
Other
14 stars 6 forks source link

Judges landing pages are all broken #40

Closed bmorrissirromb closed 5 months ago

bmorrissirromb commented 5 months ago

Judges landing pages are broken after a recent change. Error message is:

"Invalid or multiple category IDs sent Hit your browser back button to try again."

image

Example: https://www.tabroom.com/index/tourn/judges.mhtml?tourn_id=31347

The change that likely broke this is: https://github.com/speechanddebate/tabroom/commit/8a7f17257e3ca769aaca7c5b5b3b4b32ea09cd57#diff-4e5c2ca2ee1e2c69a01797515eee5616166b4f1e4da6b58e7b79ada6c7808563

bmorrissirromb commented 5 months ago

My guess at what's happening here is that the category is undefined, and that undefined doesn't equal 0?

unless ($category_id == int($category_id)) {
        $m->comp("/funclib/abort.mas", message => "Invalid or multiple category IDs sent");
    }
bmorrissirromb commented 5 months ago

Pages where the category is defined will still function, but it's impossible to navigate to them.

Example: https://www.tabroom.com/index/tourn/judges.mhtml?category_id=78156&tourn_id=29559

bmorrissirromb commented 5 months ago

Want a dumb fix? Make the default category value 0. It will drop you to the splash page.

bmorrissirromb commented 5 months ago

Resolved via commit https://github.com/speechanddebate/tabroom/commit/379d38ed281804f32a7231cc61b797fdade827fc