Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028414Openbravo ERPA. Platformpublic2014-12-15 16:262015-02-04 20:33
caristu 
NaroaIriarte 
highminoralways
closedfixed 
5
pi 
3.0PR15Q2 
AugustoMauch
Core
No
0028414: Change the error that appears in the log when defining a button without a process
The following error trace appears in the log after accessing to a window that has a button without a process or a process definition assigned to it:

ERROR freemarker.runtime - Expression field.url is undefined on line 260, column 24 in template.
 
Expression field.url is undefined on line 260, column 24 in template.
The problematic instruction:
----------
==> ${field.url?js_string} [on line 260, column 22 in template]
 in user-directive compress [on line 257, column 1 in template]
 in user-directive createView [on line 195, column 1 in template]
----------
 
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression field.url is undefined on line 260, column 24 in template.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
        ....
1) In [Tables and Columns], add a new column to any table, with button reference. Leave the process and process definition fields empty.

2) In [Windows, Tabs and Fields], add the field into the window for the previous column

3) Recompile and Restart

4) Open the window that contains the new field. Notice that the error trace is displayed in the log
Show a warning message (in the log or in the application) instead of that error trace, saying that a button without a process has been defined in the application dictionary for the window.
No tags attached.
? issue-28414.export (2,158) 2015-01-02 09:29
https://issues.openbravo.com/file_download.php?file_id=7648&type=bug
Issue History
2014-12-15 16:26caristuNew Issue
2014-12-15 16:26caristuAssigned To => AugustoMauch
2014-12-15 16:26caristuModules => Core
2014-12-15 16:26caristuResolution time => 1424732400
2014-12-15 16:26caristuTriggers an Emergency Pack => No
2014-12-15 16:26caristuIssue Monitored: networkb
2014-12-15 16:28caristuProposed Solution updated
2014-12-29 14:31AugustoMauchAssigned ToAugustoMauch => NaroaIriarte
2015-01-02 09:29AugustoMauchFile Added: issue-28414.export
2015-01-02 09:30AugustoMauchNote Added: 0073290
2015-01-02 09:39AugustoMauchStatusnew => scheduled
2015-01-02 09:39AugustoMauchfix_in_branch => pi
2015-01-05 11:34hgbotCheckin
2015-01-05 11:34hgbotNote Added: 0073302
2015-01-05 11:36AugustoMauchStatusscheduled => resolved
2015-01-05 11:36AugustoMauchFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d [^]
2015-01-05 11:36AugustoMauchResolutionopen => fixed
2015-01-05 11:36AugustoMauchReview Assigned To => AugustoMauch
2015-01-05 11:36AugustoMauchNote Added: 0073303
2015-01-05 11:36AugustoMauchStatusresolved => closed
2015-02-04 20:33hudsonbotCheckin
2015-02-04 20:33hudsonbotNote Added: 0074103

Notes
(0073290)
AugustoMauch   
2015-01-02 09:30   
A fix has been attached and will be pushed to pi once it is open for changesets targeting PR15Q2
(0073302)
hgbot   
2015-01-05 11:34   
Repository: erp/devel/pi
Changeset: 4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Dec 30 10:50:25 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4e47ac5c68fa15fe017eb69dc7ab3ee2374ce69d [^]

Related with issue 28414: Change the error that appears in the log.

An error appears in the log when accessing a window which has a button with not a process nor a process definition assigned to it.

The problem was that the fact of a button with not process nor process definition assigned to it was not taken into account and that was why an url and a command
 where not defined.

For fixing this a condition has been added to the function "getURL" and other one to the function "getCommand".
Now if a url or a command is null, a dummy value is given to them. Now, as they have a value, that value can be transformed into a string and the NPE error disappears.

This handles the case when the button is already wrongly configured. In the next step we will avoid making this configuration mistakes in new buttons.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
---
(0073303)
AugustoMauch   
2015-01-05 11:36   
Code reviewed and verified in pi@4e47ac5c68fa
(0074103)
hudsonbot   
2015-02-04 20:33   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test