This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 459296 - unable to create custom channel, get 500 error
unable to create custom channel, get 500 error
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Shannon Hughes
wes hayutin
Depends On:
Blocks: space02
  Show dependency treegraph
Reported: 2008-08-15 15:19 EDT by wes hayutin
Modified: 2009-09-17 03:00 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-17 03:00:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2008-08-15 15:19:10 EDT
Description of problem:

1. channels, managed software channels
2. create custom channel
3. fill it out, no parent
4. get 500

500 Error - Internal Server Error

You may have reached this page in one of the following ways:

   1. You are using an outdated version of Konqueror 3.0, which may not handle form variables properly in all cases. Continuing to use this outdated version of Konqueror may have unexpected results. Please up2date to the latest version of Konqueror (3.03 or greater), or if this is not possible, please use another browser.
   2. You've found an error in the site. Please report this error to your local administrator with details of how you received this message.
Comment 1 wes hayutin 2008-08-15 16:31:10 EDT
The following exception occurred while executing this request:
 POST /network/software/channels/manage/edit.pxt HTTP/1.1 (from browser)
 /network/software/channels/manage/edit.pxt (from Apache)

  Fri Aug 15 14:59:00 2008

  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Accept-Encoding: gzip,deflate
  Accept-Language: en-us,en;q=0.5
  Connection: keep-alive
  Content-Length: 273
  Content-Type: application/x-www-form-urlencoded
  Cookie: s_vi=[CS]v1|48754F070000450E-A3A081B00000004[CE]; rh_omni_tc=70160000000H4Ao; rh_omni_itc=70160000000HUrE; s_sq=%5B%5BB%5D%5D; s_cc=true; rh_user=whayutin|w|customer|; pxt-session-cookie=3xd4eaef3c60ba6563cb99561370f66de6
  Keep-Alive: 300
  User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2008070206 Firefox/3.0.1

Form variables:
  channel_arch => 500
  channel_description => 
  channel_gpg_key_fp => 
  channel_gpg_key_id => 
  channel_gpg_key_url => 
  channel_name => fedora9
  channel_parent => None
  channel_summary => fedora9
  cid => 
  clone_from => 
  clone_type => 
  new_channel_label => fedora9
  pxt:trap => rhn:channel_edit_cb
  submit => Create Channel

User Information:
  User admin (id 1, org_id 1)

Error notes:

Initial Request:

Error message:
  RHN::Exception: DBD::Oracle::st execute failed: ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at line 2 (DBD ERROR: OCIStmtExecute) [for Statement "BEGIN
  :ret := rhn_channel.get_org_access(:p1, :p2);
END;" with ParamValues: :ret=undef, :p1='None', :p2="1"]
  RHN::DB /var/www/lib/RHN/ 237 RHN::Exception::DB::throw
  RHN::DB::db /var/www/lib/RHN/ 491 RHN::DB::handle_error
  RHN::DB::User /var/www/lib/RHN/DB/ 1375 RHN::DB::db::call_function
  RHN::DB::User /var/www/lib/RHN/DB/ 1385 RHN::DB::User::verify_permission_function_helper
  Sniglets::ChannelEditor /var/www/lib/Sniglets/ 161 RHN::DB::User::verify_channel_access
  PXT::ApacheHandler /var/www/lib/PXT/ 625 Sniglets::ChannelEditor::channel_edit_cb
  PXT::Request /var/www/lib/PXT/ 747 PXT::ApacheHandler::pxt_parse_data
  PXT::Handlers /var/www/lib/PXT/ 112 PXT::Request::include
  PXT::Parser /var/www/lib/PXT/ 152 PXT::Handlers::pxt_include_handler
  PXT::Parser /var/www/lib/PXT/ 83 PXT::Parser::expand_tag
  PXT::ApacheHandler /var/www/lib/PXT/ 521 PXT::Parser::expand_tags
  PXT::ApacheHandler /var/www/lib/PXT/ 123 PXT::ApacheHandler::pxt_parse_data
  PXT::ApacheHandler /var/www/lib/PXT/ 123 (eval)
  main -e 0 PXT::ApacheHandler::handler
  main -e 0 (eval)
Comment 2 Shannon Hughes 2008-08-22 13:22:15 EDT
bug was introduced at the end of July in the PXT layer. 

commit a4dc707c90ce156c8a9e3336fdd910d4c4ac2a76
bugzilla 457200: do not enforce empty default values

+      next if (($buggy_utf8 eq 'value') and not ($e->{$key}));

^^ need to ignore select elements when rendering

ccing msuchy

fix is scheduled for 8/25
Comment 3 Miroslav Suchý 2008-08-25 04:04:53 EDT
[17:13] <shughes> msuchy, bugzilla 457200: do not enforce empty default values
[17:14] <msuchy> shughes: yes?
[17:14] <shughes> msuchy, i think that might be breaking the perl code when sending values to the RHN layer
[17:14] <msuchy> shughes: how?
[17:15] <shughes> msuchy, the select code that is generated is defaulting to the option and not the value
[17:15] <shughes> i need to look at it more
[17:16] <shughes> but if you take a look at the sniglets ChannelEditor at the select call for channel_parent
[17:16] <shughes> around line 688 in git
[17:18] <msuchy> shughes: huh?
[17:18] <msuchy> next KEY if (($buggy_utf8 eq 'value') and !($e->{$key}));
[17:18] <shughes> one sec
[17:18] <msuchy> soo if it is value, skip it
[17:19] <msuchy> otherwise proceed
[17:19] <shughes> for some reason, select values of "" are not getting ouput to the browser
[17:19] <shughes> for example, -options => [ [ "None", "", 1 ],
[17:19] <shughes> turns into <option selected="1">None</option>
[17:20] <shughes> which the browser then ends the "None" value (default for option) instead of a empty string
[17:20] <shughes> ...which then makes the db layer barf
[17:20] <msuchy> aha, I seee, the condition is wrong, it should be
[17:21] <msuchy> wrong idea
[17:21] <msuchy> what is -options => [ [ "None", "", 1 ], ?
[17:22] <msuchy> i.e. what the output should be in html?
[17:22] <shughes> <option value="" selected="1">None</option>
[17:23] <msuchy> aha, i see, so I fix it for input texts and broke selects
[17:23] <shughes> :)
[17:23] <msuchy> can you post it to that BZ, I'll fix it on Monday
[17:23] <shughes> sure
[17:23] <shughes> i'll cc u on the bug

[17:26] <msuchy> shughes: I see solution already (... and $elem_type =~ m/text/i), but I'll commit it no monday after checks
Comment 4 Miroslav Suchý 2008-08-25 04:41:40 EDT
Commited to GIT as 33f855b853d339bf578b1b93a9abcaf556f013c1
Comment 5 Devan Goodwin 2008-09-05 08:43:52 EDT
Verified in spacewalk 0.2. Can now create custom channels ok.
Comment 6 Miroslav Suchý 2009-09-17 03:00:11 EDT
Spacewalk is released for long time.

Note You need to log in before you can comment on or make changes to this bug.