Bug 459296 - unable to create custom channel, get 500 error
Summary: unable to create custom channel, get 500 error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Shannon Hughes
QA Contact: wes hayutin
URL: https://rlx-3-18.rhndev.redhat.com/ne...
Whiteboard:
Depends On:
Blocks: space02
TreeView+ depends on / blocked
 
Reported: 2008-08-15 19:19 UTC by wes hayutin
Modified: 2009-09-17 07:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:00:11 UTC
Embargoed:


Attachments (Terms of Use)

Description wes hayutin 2008-08-15 19:19:10 UTC
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 20:31:10 UTC
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)

Date:
  Fri Aug 15 14:59:00 2008

Headers:
  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
  Host: rlx-3-18.rhndev.redhat.com
  Keep-Alive: 300
  Referer: https://rlx-3-18.rhndev.redhat.com/network/software/channels/manage/edit.pxt
  User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) 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:
  (none)

Initial Request:
  Yes

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/DB.pm 237 RHN::Exception::DB::throw
  RHN::DB::db /var/www/lib/RHN/DB.pm 491 RHN::DB::handle_error
  RHN::DB::User /var/www/lib/RHN/DB/User.pm 1375 RHN::DB::db::call_function
  RHN::DB::User /var/www/lib/RHN/DB/User.pm 1385 RHN::DB::User::verify_permission_function_helper
  Sniglets::ChannelEditor /var/www/lib/Sniglets/ChannelEditor.pm 161 RHN::DB::User::verify_channel_access
  PXT::ApacheHandler /var/www/lib/PXT/ApacheHandler.pm 625 Sniglets::ChannelEditor::channel_edit_cb
  PXT::Request /var/www/lib/PXT/Request.pm 747 PXT::ApacheHandler::pxt_parse_data
  PXT::Handlers /var/www/lib/PXT/Handlers.pm 112 PXT::Request::include
  PXT::Parser /var/www/lib/PXT/Parser.pm 152 PXT::Handlers::pxt_include_handler
  PXT::Parser /var/www/lib/PXT/Parser.pm 83 PXT::Parser::expand_tag
  PXT::ApacheHandler /var/www/lib/PXT/ApacheHandler.pm 521 PXT::Parser::expand_tags
  PXT::ApacheHandler /var/www/lib/PXT/ApacheHandler.pm 123 PXT::ApacheHandler::pxt_parse_data
  PXT::ApacheHandler /var/www/lib/PXT/ApacheHandler.pm 123 (eval)
  main -e 0 PXT::ApacheHandler::handler
  main -e 0 (eval)

Comment 2 Shannon Hughes 2008-08-22 17:22:15 UTC
bug was introduced at the end of July in the PXT layer. 

commit a4dc707c90ce156c8a9e3336fdd910d4c4ac2a76
bugzilla 457200: do not enforce empty default values
/web/modules/pxt/PXT/HTML.pm


+      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 08:04:53 UTC
[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 08:41:40 UTC
Commited to GIT as 33f855b853d339bf578b1b93a9abcaf556f013c1

Comment 5 Devan Goodwin 2008-09-05 12:43:52 UTC
Verified in spacewalk 0.2. Can now create custom channels ok.

Comment 6 Miroslav Suchý 2009-09-17 07:00:11 UTC
Spacewalk is released for long time.


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