Nguyen Huu Nhat created CONNECTORS-1726: -------------------------------------------
Summary: Timeout values for Genreric Repository is not updated after setting Key: CONNECTORS-1726 URL: https://issues.apache.org/jira/browse/CONNECTORS-1726 Project: ManifoldCF Issue Type: Bug Reporter: Nguyen Huu Nhat Hi there, As there is a problem that is still not addressed during use, I would like to suggest the following correction for the source code of the Generic Repository Connector. For additional details, please see below: h3. +*1. Connector name*+ Generic Repository Connector h3. +*2. Issue*+ When I create or edit a Generic repository connection, I cannot update the value in the following fields: * Connection timeout (milis) * Socket timeout (milis) h3. +*3. Reproduction*+ * Create a Generic repository connection ** On *Entry point* tab, edit the values of *Connection timeout (milis)* and *Socket timeout (milis)* fields ** Click on *Save* button * On *View Repository Connection Status - Generic* screen, it can be seen that the values of the 2 above fields are not updated. h3. +*4. Cause*+ The names of the textboxes for the 2 fields are the followings: * genericConTimeout * genericSoTimeout However, the names that are being used inside the source code are the followings: * genericConnectionTimeout * genericSocketTimeout This results in that new values can not be obtained, thus the values of the 2 fields can not be updated. h3. +*5. Solution*+ Update parameter names for Connection Timeout and Socket Timeout with names that are being stored inside the DataBase: * genericConTimeout ➞ genericConnectionTimeout * genericSoTimeout ➞ genericSocketTimeout h3. +*6. Suggested source code (based on release 2.22.1)*+ [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L510] {code:java} + " <tr>\n" + " <td class=\"description\"><nobr>" + Messages.getBodyString(locale, "generic.ConnectionTimeoutColon") + "</nobr></td>\n" - + " <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericConTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/></td>\n" + + " <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericConnectionTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/></td>\n" + " </tr>\n" + " <tr>\n" + " <td class=\"description\"><nobr>" + Messages.getBodyString(locale, "generic.SocketTimeoutColon") + "</nobr></td>\n" - + " <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericSoTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/></td>\n" + + " <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericSocketTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/></td>\n" + " </tr>\n" {code} [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L523] {code:java} - out.print("<input type=\"hidden\" name=\"genericConTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/>\n"); - out.print("<input type=\"hidden\" name=\"genericSoTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/>\n"); + out.print("<input type=\"hidden\" name=\"genericConnectionTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/>\n"); + out.print("<input type=\"hidden\" name=\"genericSocketTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/>\n"); {code} [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L535] {code:java} - copyParam(variableContext, parameters, "genericConTimeout"); - copyParam(variableContext, parameters, "genericSoTimeout"); + copyParam(variableContext, parameters, "genericConnectionTimeout"); + copyParam(variableContext, parameters, "genericSocketTimeout"); {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)