Bug 1225492 - XHTML files contain errorprone javascript calls
Summary: XHTML files contain errorprone javascript calls
Status: CLOSED ERRATA
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Content
Version: JON 3.3.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: CR01
: JON 3.3.3
Assignee: Libor Zoubek
QA Contact: Filip Brychta
URL:
Whiteboard:
Keywords: Triaged
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-27 13:31 UTC by Libor Zoubek
Modified: 2015-11-02 00:44 UTC (History)
3 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-07-30 16:43:38 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1525 normal SHIPPED_LIVE Moderate: Red Hat JBoss Operations Network 3.3.3 update 2015-07-30 20:41:08 UTC

Description Libor Zoubek 2015-05-27 13:31:44 UTC
Description of problem:

When fixing several content related issues I found we use this javascripts in our *-plain.xhtml

document.getElementById('pollerForm').setAttribute('action', 'contentProvider-plain.xhtml');
document.getElementById('contentProviderDetailsForm').setAttribute('action', 'contentProvider-plain.xhtml');
document.getElementById('contentSourceSyncResultsListForm').setAttribute('action', 'contentProvider-plain.xhtml');
document.getElementById('contentSourceRepoListForm').setAttribute('action', 'contentProvider-plain.xhtml');

This is errorprone, because some of forms are rendered under certain condition. If for example form with id pollerForm is not rendered, then whole javascript fails due to first error and 'action' attributes are not set to the rest of forms.



Actual results: somethimes there are errors in browser dev console for example when viewing content source


Expected results: no exceptions in JS dev console


Additional info:

Comment 1 Libor Zoubek 2015-05-27 13:38:14 UTC
branch:  master
link:    https://github.com/rhq-project/rhq/commit/572ff6018
time:    2015-05-27 15:37:14 +0200
commit:  572ff60186bae13f6a2701a1932331f75f54fad8
author:  Libor Zoubek - lzoubek@redhat.com
message: Bug 1225492 - XHTML files contain errorprone javascript calls

         errorprone calls replaced with safe function

Comment 4 Simeon Pinder 2015-07-10 18:55:30 UTC
Available for test with 3.3.3 ER01 build: 
https://brewweb.devel.redhat.com/buildinfo?buildID=446732
 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of
 jon-server-3.3.0.GA-update-03.zip.

Comment 5 Filip Brychta 2015-07-14 12:20:01 UTC
Checked content of jon-server-3.3.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-portal.war/rhq/content/contentProvider-plain.xhtml
and it does NOT contain changes from commit in comment 1.

Looking at comment 3 it seems that incorrect commit was cherry picked

Comment 7 Simeon Pinder 2015-07-24 06:19:53 UTC
Available for test with following build:
 https://brewweb.devel.redhat.com/buildinfo?buildID=448923
   *Note: jon-server-patch-3.3.0.GA.zip maps to CR01 build of
   jon-server-3.3.0.GA-update-03.zip.

Comment 8 Filip Brychta 2015-07-24 09:51:18 UTC
Verified on
Version :	
3.3.0.GA Update 03
Build Number :	
edc324f:119e8f4

Comment 10 errata-xmlrpc 2015-07-30 16:43:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1525.html


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