Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005516Openbravo ERPA. Platformpublic2008-10-13 18:372009-10-26 05:40
elopio 
iperdomo 
urgentmajoralways
closedfixed 
5
2.40 
 
Core
No
0005516: Two tables with same Id
Data tables on ERP have 'grid_table' as Id, but they are inside a table element that has the same id.

This happens on the grid view and on the selector popups.

<!-- FIRST -->
<table id="grid_table" class="Main_Client_TableRelation" cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td>
<div style="height: 80px; width: 964px;">
<div id="grid_container_old1" style="display: none;"/>
<div id="grid_container">
<div id="grid_viewPort" style="float: left; overflow-x: auto;
overflow-y: hidden; width: 924px; height: 120px;">
<table id="grid_table_header" class="DataGrid_Header_Table" style="width: 807px;">

</table>

<!-- SECOND -->
<table id="grid_table" class="DataGrid_Body_Table" style="width: 807px;
height: 20px;">

</table>
</div>
Log In
Go to the grid view of any form window
---------
Log In
Go to Master Data Management || Product
click new
click Storage bin selector
Change the id of one of the tables.
250MP8, main
related to defect 0011201 closed dbaz Table in grid view has "undefined_table" as id 
log grep.log (85,380) 2009-01-13 14:14
https://issues.openbravo.com/file_download.php?file_id=632&type=bug
png grid_table.png (83,522) 2009-10-02 05:39
https://issues.openbravo.com/file_download.php?file_id=1805&type=bug
png

html PeriodControl_Relation.html (31,492) 2009-10-02 07:46
https://issues.openbravo.com/file_download.php?file_id=1806&type=bug
Issue History
2008-10-13 18:37elopioNew Issue
2008-10-13 18:37elopioAssigned To => cromero
2008-10-13 18:37elopiosf_bug_id0 => 2164012
2008-10-13 18:37elopioRegression testing => No
2008-10-20 10:55psarobeStatusnew => scheduled
2008-10-20 10:55psarobeNote Added: 0009640
2008-10-20 10:55psarobeAssigned Tocromero => alostale
2008-10-20 10:55psarobefix_in_branch => trunk
2008-12-10 09:56alostaleAssigned Toalostale => iperdomo
2009-01-13 14:14iperdomoFile Added: grep.log
2009-01-13 14:16iperdomoNote Added: 0012145
2009-01-13 14:20iperdomoStatusscheduled => closed
2009-01-13 14:20iperdomoNote Added: 0012146
2009-01-13 14:20iperdomoResolutionopen => unable to reproduce
2009-10-02 05:38elopioStatusclosed => new
2009-10-02 05:38elopioResolutionunable to reproduce => open
2009-10-02 05:38elopioNote Added: 0020644
2009-10-02 05:39elopioFile Added: grid_table.png
2009-10-02 07:46iperdomoFile Added: PeriodControl_Relation.html
2009-10-02 07:47iperdomoStatusnew => closed
2009-10-02 07:47iperdomoNote Added: 0020645
2009-10-02 07:47iperdomoResolutionopen => unable to reproduce
2009-10-02 17:46plujanNote Added: 0020679
2009-10-02 17:46plujanPriorityhigh => urgent
2009-10-02 17:46plujanSeverityminor => major
2009-10-02 17:46plujanStatusclosed => new
2009-10-02 17:46plujanResolutionunable to reproduce => open
2009-10-02 17:46plujanCategoryB. User interface => A. Platform
2009-10-02 17:46plujanfix_in_branchpi =>
2009-10-02 17:46plujanStatusnew => scheduled
2009-10-02 17:46plujanfix_in_branch => pi
2009-10-02 20:03hgbotCheckin
2009-10-02 20:03hgbotNote Added: 0020682
2009-10-02 20:03hgbotStatusscheduled => resolved
2009-10-02 20:03hgbotResolutionopen => fixed
2009-10-02 20:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/d65c011967fe51caf73c6549c49844ff1c43a8ed [^]
2009-10-22 19:26psarobeTag Attached: main
2009-10-22 19:33psarobeTag Attached: 250MP8
2009-10-26 05:40elopioStatusresolved => closed
2009-10-31 03:01elopioRelationship addedrelated to 0011201

Notes
(0009640)
psarobe   
2008-10-20 10:55   
It has high priority because of Automation testing
(0012145)
iperdomo   
2009-01-13 14:16   
Attached you'll find a grep.log that is the number of occurrences of the line id="grid_table" in a file.

You can check it with the following command:
grep -nrH 'id=\"grid_table\"' . | awk -F : '{print $1}' | sort | uniq -c
(0012146)
iperdomo   
2009-01-13 14:20   
I couldn't find a duplicated id="grid_table" in all the code base.
I tested the 'Storage Bin' with firebug:

>>> document.getElementById('grid_table')
<table id="grid_table" class="Main_Client_TableRelation" cellspacing="0" cellpadding="0" border="0" width="100%">

Only returned 1 table element

Thanks,
(0020644)
elopio   
2009-10-02 05:38   
Reopened this issue because I still can reproduce it.
Firebug returns only one element, but there are two.

I'll attach the image of Financial Management || Accounting || Setup || Fiscal Calendar || Calendar >> Year >> Period >> Period Control so you can see it.

This is one yesterday's installation of 2.40 on QA servers.

thanks,
pura vida.
(0020645)
iperdomo   
2009-10-02 07:47   
Hi,
Attached you'll find the html code of that tab in grid mode.

Please run the grep command (in the notes) to count the number of grid_table string per file.

I'm using 2.40:
$ hg id
70a2052426b1 tip
(0020679)
plujan   
2009-10-02 17:46   
Reopening the issue and raising both priority and severity since it blocks development of automated scripts.

Ivan, note that static html reading will not reveal the second table since it is filled using a dojo function. If you use Firebug, you will see that table object with class Main_Client_TableRelation and table object with class DataGridBody_Table share the same id, "grid_table"

If you are still unable to reproduce it, Leo or I could show you what is the problem.
(0020682)
hgbot   
2009-10-02 20:03   
Repository: erp/stable/2.40
Changeset: d65c011967fe51caf73c6549c49844ff1c43a8ed
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Fri Oct 02 20:02:22 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40/rev/d65c011967fe51caf73c6549c49844ff1c43a8ed [^]

Fixes issue 5516: Renamed id attribute of table containing the grid

---
M src-wad/src/org/openbravo/wad/controls/WADGrid.java
---