Time periods mixed up
-
I've upgraded a mango installation from 1.2.3 to 1.4.0 and then to 1.4.1.
When I load up the data source edit page for a modbus_ip datasource it shows the update period as 15 seconds instead of 15 minutes. If I save it as 15 minutes, and then reload the page it still shows 15 seconds. However the update period must be saved correctly as the source is only updated every 15 minutes. When I view source on the select box there is no SELECTED attribute on any of the option tags.
This problem is not confined to the datasource edit page. I've observed the same behaviour while switching points over to interval logging.
I do not have this problem on a fresh 1.4.1 installation.
I created a new datasource on the upgraded 1.4.1 installation and was unable to set the update period properly on the new ds, so the problem isn't confined to pre-existing datasources either.
Can I delete and re-install the webapps/ROOT directory or is there some way of investigating how the upgrade is botched? I have remote access to the server and eclipse is installed so remote debugging is an option.
Thanks
Craig -
I can't recreate the problem on my instances, so i suggest a reinstallation.
All you really need to keep is the database. The only difference between the regular installation and the upgrade is that a couple of configuration files are not included in the latter (in case the user changed some values). If you delete the ROOT dir and replace with a fresh instance, assuming you didn't change where your database is, everything should still be good.
-
I deleted the webapps/ROOT directory and extracted the 1.4.1 archive and I'm still seeing the same behaviour.
Could it be caused by an incomplete upgrade?
-
The code in question is in WEB-INF/jsp/dataSourceEdit/editModbus.jsp. Starting at line 124 there is this:
<tr> <td class="formLabelRequired"><fmt:message key="dsEdit.updatePeriod"/></td> <td class="formField"> <input type="text" id="updatePeriods" value="${dataSource.updatePeriods}" class="formShort"/> <sst:select id="updatePeriodType" value="${dataSource.updatePeriodType}"> <tag:timePeriodOptions sst="true" s="true" min="true" h="true"/> </sst:select> </td> </tr>
The important part is the sst="true" in line 129. If this is present it should work ok.
If you find that the code is ok, can you please post or email to me how this code renders in the browser.
-
The sst=true is present in the editModus.jsp file. The select tag in the browser is:
<td class="formLabelRequired">Update period</td> <td class="formField"> <input type="text" id="updatePeriods" value="15" class="formShort"/> <select id="updatePeriodType"> <option value="1">second(s)</option> <option value="2">minutes(s)</option> <option value="3">hours(s)</option> </select> </td>
editModbus.jsp in CVS is different from the commercial version so I don't think there is much debugging I can do short of sending you a copy of the database without any pointdata.
Thanks for the help,
craig -
You can do something like this: in the JSP that i mentioned earlier, add the code after the input below: (you can put it into a comment if you like - the forums won't let me do it for some reason)
<tr> <td class="formLabelRequired"><fmt:message key="dsEdit.updatePeriod"/></td> <td class="formField"> <input type="text" id="updatePeriods" value="${dataSource.updatePeriods}" class="formShort"/> ${dataSource.updatePeriodType} <sst:select id="updatePeriodType" value="${dataSource.updatePeriodType}"> <tag:timePeriodOptions sst="true" s="true" min="true" h="true"/> </sst:select> </td> </tr>
Then, again post the rendered html. The JSP will recompile automatically.
-
I added the periods around the 2. When I paste this HTML I am removing many empty lines. I don't know if that is relevant.
<td class="formLabelRequired">Update period</td> <td class="formField"> <input type="text" id="updatePeriods" value="15" class="formShort"/> update period type is . 2 . <select id="updatePeriodType"> <option value="1">second(s)</option> <option value="2">minutes(s)</option> <option value="3">hours(s)</option> </select>
-
Hmm... "2" is certainly not equal to " 2 ". But the value is an integer; i have no explanation why spaces would be showing up.
-
I put the spaces there too! The appropriate value for minutes is in the ${dataSource.updatePeriods} variable. I
-
I'm stumped. Do you have an instance available on the internet i can look at?
-
I upgraded from tomcat 5.5.17 to the latest 6.x and this problem has disappeared.