IXP-Manager icon indicating copy to clipboard operation
IXP-Manager copied to clipboard

Creating switches fails if cabinetid or infrastructure params are undefined

Open nickhilliard opened this issue 3 years ago • 4 comments

ISSUE TYPE

Bug Report

VERSION
6.2.0
SUMMARY

/switch/store-by-snmp method fails with 405 if either cabinetid or infrastructure params are left undefined.

STEPS TO REPRODUCE
  1. browse to /switch/create-by-snmp
  2. leave either "Infrastructure" or "Rack" pull-down list unchanged
  3. click Create
EXPECTED RESULTS

Should work

ACTUAL RESULTS
Oops! An Error Occurred
The server returned a "405 Method Not Allowed".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

nickhilliard avatar Nov 18 '21 20:11 nickhilliard

Issue is with $r->validate() here.

validate() returns to the referrer but in the add-by-snmp stream, the referred is the initial page where the user enters hostname and community rather than the actual form that is being edited. Will need a little bit of work to resolve.

barryo avatar Nov 28 '21 11:11 barryo

A first "fix" is to make it obvious that these fields must be populated. The next level fix would be to give a meaningful error message, but that might not be worth the effort.

lucix-mich avatar Nov 17 '22 16:11 lucix-mich