Description of problem: I was trying to perform boundary test are created a install media with more than 255 characters and UI raises following error: Error PGError: ERROR: value too long for type character varying(255) : INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" Version-Release number of selected component (if applicable): sat6 GA snap1 How reproducible: always Steps to Reproduce: 1. create media with more than 255 characters of name 2. 3. Actual results: Error PGError: ERROR: value too long for type character varying(255) : INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" Expected results: A proper validation error should be raised. Additional info: production.log: Processing by MediaController#create as */* Parameters: {"utf8"=>"✓", "search"=>"", "authenticity_token"=>"VX+UKFuIgqWyHwxAdhnLIrzFLAmDgGh5qENjFuLnsso=", "medium"=>{"name"=>"GlQTCDmDxesNUcEJdEXrqTPuIbBUmQwkejHGSrMbHsLGdhADopvRvwnLXHMReeAtIxlkRNpuKAkHGHMziLsnOndDMfemCoDgJewqSrwAXUTLAKeNnCeleDJeGBVnlmzBzZamfDmUBMjqJchefmIxCnJuHGoHilwrnMCRNZuMQnwyEguohCjIMznZRkGHrZXKmHikPGUblhRyBJxoZoadIiUKmlhoAxtzBZtjezFyrIsQSZvcYSjTuwGHwYjUCbM1", "path"=>"http://mirror.fakeos.org/vVcP/$major.$minor/os/$arch", "media_path"=>"", "config_path"=>"", "image_path"=>"", "os_family"=>"Redhat", "location_ids"=>[""], "organization_ids"=>[""]}} Operation FAILED: PGError: ERROR: value too long for type character varying(255) : INSERT INTO "media" ("config_path", "created_at", "image_path", "media_path", "name", "os_family", "path", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" Rendered common/500.html.erb (6.9ms) Completed 500 Internal Server Error in 23ms (Views: 7.6ms | ActiveRecord: 2.1ms)
Created redmine issue http://projects.theforeman.org/issues/6712 from this bug
The same fix gets both. Please treat these as duplicates even though item being edited is not the same. *** This bug has been marked as a duplicate of bug 1120095 ***