Bug 459296
| Summary: | unable to create custom channel, get 500 error | ||
|---|---|---|---|
| Product: | [Community] Spacewalk | Reporter: | wes hayutin <whayutin> |
| Component: | Server | Assignee: | Shannon Hughes <shughes> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | wes hayutin <whayutin> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 0.2 | CC: | dgoodwin, msuchy, shughes |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://rlx-3-18.rhndev.redhat.com/network/software/channels/manage/edit.pxt | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-09-17 07:00:11 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 456550 | ||
|
Description
wes hayutin
2008-08-15 19:19: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) 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
[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
Commited to GIT as 33f855b853d339bf578b1b93a9abcaf556f013c1 Verified in spacewalk 0.2. Can now create custom channels ok. Spacewalk is released for long time. |