x-ray
Posts: 18
|
Posted: 05/04/2012, 5:20 AM |
|
When I use autofill and generate the code (publish) I always get a warning:
Generating "CLSsales\sales_order_entry"
Warning:An unclosed string constant. Ln: 378, Col: 167.
The program works perfect.
Does anyone have the same experience?
Should I be worried about this warning?
The lines where the warning occurs are:
new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l1_product_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
method: "get",
_________________
I may disapprove of what you say, but I will defend to the death your right to say it |
|
|
clahti2
Posts: 107
|
Posted: 05/24/2012, 10:50 AM |
|
can you post the entire block of code from the file for the following lines
Ln: 370 - Ln: 380
I will have a look
|
|
|
x-ray
Posts: 18
|
Posted: 05/24/2012, 12:50 PM |
|
Meanwhile my code changed.
Current message = Warning:An unclosed string constant. Ln: 362, Col: 167.
I am in contact with YesSoftware.
They are looking into this....
line 359: //PTAutoFill3 Loading @278-8D27C235
function EntryBlock_orderorder_l2_stock_idPTAutoFill3_start(sender) {
if (!sender) return;
new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
method: "get",
requestHeaders: ['If-Modified-Since', new Date(0)],
onSuccess: function(transport) {
var valuesRow = eval(transport.responseText)[0];
if (typeof(valuesRow) != "undefined") {
getSameLevelCtl("EntryBlock_orderl2_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_orderadmin_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_ordertotal_currency", sender).value = valuesRow["currency_code"];
getSameLevelCtl("EntryBlock_orderorder_currency_id", sender).value = valuesRow["currency_id"];
} else {
getSameLevelCtl("EntryBlock_orderl2_currency", sender).value = "";
getSameLevelCtl("EntryBlock_orderadmin_currency", sender).value = "";
getSameLevelCtl("EntryBlock_ordertotal_currency", sender).value = "";
getSameLevelCtl("EntryBlock_orderorder_currency_id", sender).value = "";
}
},
onFailure: function(transport) {
alert(transport.responseText);
}
});
}
Line 384: //End PTAutoFill3 Loading
_________________
I may disapprove of what you say, but I will defend to the death your right to say it |
|
|
x-ray
Posts: 18
|
Posted: 05/24/2012, 12:56 PM |
|
Sorry, I think this looks/reads better.
361: if (!sender) return;
362: new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
363: method: "get",
_________________
I may disapprove of what you say, but I will defend to the death your right to say it |
|
|
clahti2
Posts: 107
|
Posted: 06/04/2012, 12:11 PM |
|
Quote x-ray:
Sorry, I think this looks/reads better.
361: if (!sender) return;
362: new Ajax.Request("../services/CLSsales_sales_order_entry_EntryBlock_order_order_l2_stock_id_PTAutoFill1.php?keyword=" + encodeURIComponent(sender.value).replace(/'/g, "%27"), {
363: method: "get",
So your answer is the unescaped quote in the regex section (//g), I wonder if adding a backslash would suppress the warning/error
|
|
|
Lucius
Posts: 220
|
Posted: 06/06/2012, 8:59 AM |
|
Hi,
CCS support knows about this issue. There is no patch, maybe they will fix it in next version of CCS. For now you can ignore the error related to the replace(/'/g, "%27"), { piece of code generated. It should not affect your app in any way, except annoying you with the warning.
|
|
|
|