Bug 1225492 - XHTML files contain errorprone javascript calls
Summary: XHTML files contain errorprone javascript calls
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Content
Version: JON 3.3.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: CR01
: JON 3.3.3
Assignee: Libor Zoubek
QA Contact: Filip Brychta
Depends On:
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)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-07-30 16:43:38 UTC
Type: Bug

Attachments (Terms of Use)

System 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: 
 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of

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:
   *Note: jon-server-patch-3.3.0.GA.zip maps to CR01 build of

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

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.


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