I have a problem on my Development 7.12 box that does not exist on my Production 7.12 box and is most likely self induced. First, the dev box was at 7.11 and I upgraded it thinking this problem could be resolved but did not. The production box was installed using version 7.12.
I do have customization’s on the Cases. The custom/modules/js/detailfiew.js:
$(document).ready(function () {
$("a#tab1").hide();
if ($("#meetingid_c").html() != "") {
$("div[field='create_schedule']").parent('div').addClass("hidden");
} else {
$("div[field='create_schedule']").parent('div').removeClass("hidden");
$("div[field='meetingid_c']").parent('div').addClass("hidden");
}
$("#serviceid_c_span").find("option").eq(0).remove();
$("div[field='serviceid_c'] div.inlineEditIcon span.suitepicon-action-edit").hide();
var userNum = $("#serviceid_c_span option:selected").val();
if (userNum !== undefined && !isNaN(userNum)) {
getUserServices(userNum);
}
});
function getUserServices(number) {
$.ajax({
method: "GET",
url: "/index.php?entryPoint=caseGetServices",
data: "get=BmCpeMacPopState&service=" + number,
type: JSON,
success: showServicesStatus,
});
}
function showServicesStatus(obj) {
$("#cpe_mac_status_c").html(obj.html);
}
I noticed a problem on the dev box while trying to upload a document to a case. The files appeared to not upload and never showed any files. The Web Developer console shows the following error when clicking on a case (detail view). I do not get this error on my production box.
10:50:21.767 error adding script
10:50:21.767 SyntaxError: expected expression, got '<'
globalEval http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1.js?v=8KFk1GvnAT7aXsZsiVyqpw:418
globalEval http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1.js?v=8KFk1GvnAT7aXsZsiVyqpw:418
evalScript http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1.js?v=8KFk1GvnAT7aXsZsiVyqpw:424
callback http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1.js?v=8KFk1GvnAT7aXsZsiVyqpw:619
handleTransactionResponse http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:31
handleReadyState/this._poll[c.tId]< http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:31
setInterval handler*handleReadyState http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:31
asyncRequest http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:31
go http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1.js?v=8KFk1GvnAT7aXsZsiVyqpw:640
o http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:290
j http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:290
f http://suitecrm2-dev.mydomain.com/cache/include/javascript/sugar_grp1_yui.js?v=8KFk1GvnAT7aXsZsiVyqpw:290
sugar_grp1.js:425:119
10:50:21.772 Array(4) [ "<script id=\"updateFileRowTemplate\" type=\"text/template\">\n <span class=\"caseDocumentWrapper\">\n <select class=\"caseDocumentTypeSelect\">\n <option value=\"internal\">Internal CRM document</option>\n <option value=\"external\">External file</option>\n </select>\n <input type=\"file\" id=\"case_update_file[]\" name=\"case_update_file[]\">\n <span class=\"internalCaseDocumentWrapper\">\n <input type=\"text\" name=\"case_document_name\" class=\"sqsEnabled\" tabindex=\"0\" id=\"case_document_name\" size=\"\" value=\"\" title='' autocomplete=\"off\">\n <input type=\"hidden\" name=\"case_document_id\" id=\"case_document_id\" value=\"\">\n\n <span class=\"id-ff multiple\">\n <button type=\"button\" name=\"btn_case_document_name\" id=\"btn_case_document_name\" tabindex=\"0\" title=\"Select document\" class=\"button firstChild\" value=\"Select document\"\n \n onclick='open_popup(\n \"Documents\",\n 600,\n 400,\n \"\",\n true,\n false,\n {\"call_back_function\":\"set_return\",\"form_name\":\"EditView\",\"field_to_name_array\":{\"id\":\"case_document_id\",\"name\":\"case_document_name\"}},\n \"single\",\n true\n );' >\n \n <span class=\"suitepicon suitepicon-action-select\"></span></button>\n <button type=\"button\" name=\"btn_clr_case_document_name\"\n id=\"btn_clr_case_document_name\" tabindex=\"0\" title=\"Clear document\" class=\"button lastChild\"\n onclick=\"SUGAR.clearRelateField(this.form, 'case_document_name', 'case_document_id');\" value=\"Clear document\" ><span class=\"suitepicon suitepicon-action-clear\"></span></button>\n </span>\n </span>\n\n<button class=\"removeFileButton\" type=\"button\">Remove file</button><br>\n </span>\n\n</script>", " id=\"updateFileRowTemplate\" type=\"text/template\"", "\n <span class=\"caseDocumentWrapper\">\n <select class=\"caseDocumentTypeSelect\">\n <option value=\"internal\">Internal CRM document</option>\n <option value=\"external\">External file</option>\n </select>\n <input type=\"file\" id=\"case_update_file[]\" name=\"case_update_file[]\">\n <span class=\"internalCaseDocumentWrapper\">\n <input type=\"text\" name=\"case_document_name\" class=\"sqsEnabled\" tabindex=\"0\" id=\"case_document_name\" size=\"\" value=\"\" title='' autocomplete=\"off\">\n <input type=\"hidden\" name=\"case_document_id\" id=\"case_document_id\" value=\"\">\n\n <span class=\"id-ff multiple\">\n <button type=\"button\" name=\"btn_case_document_name\" id=\"btn_case_document_name\" tabindex=\"0\" title=\"Select document\" class=\"button firstChild\" value=\"Select document\"\n \n onclick='open_popup(\n \"Documents\",\n 600,\n 400,\n \"\",\n true,\n false,\n {\"call_back_function\":\"set_return\",\"form_name\":\"EditView\",\"field_to_name_array\":{\"id\":\"case_document_id\",\"name\":\"case_document_name\"}},\n \"single\",\n true\n );' >\n \n <span class=\"suitepicon suitepicon-action-select\"></span></button>\n <button type=\"button\" name=\"btn_clr_case_document_name\"\n id=\"btn_clr_case_document_name\" tabindex=\"0\" title=\"Clear document\" class=\"button lastChild\"\n onclick=\"SUGAR.clearRelateField(this.form, 'case_document_name', 'case_document_id');\" value=\"Clear document\" ><span class=\"suitepicon suitepicon-action-clear\"></span></button>\n </span>\n </span>\n\n<button class=\"removeFileButton\" type=\"button\">Remove file</button><br>\n </span>\n\n", "\n" ]
sugar_grp1.js:425:134
When trying to upload an external document in the Edit View and clicking Save or Save and Continue, I do not see any error messages. However, the POST statement shows a 301 Moved Permanently Error (production does not). Looking in the database at the Notes table I can see the document has been add. There is a file matching the id in the uploads folder (not sure if the file is stored in a table).
Reloading the page after the upload attempt I don’t see any files listed anywhere. On my production box under the CASE UPDATES section I can see the files uploaded. My dev box does not show a CASE UPDATES section.
My first thought is that I make a mistake on a JavaScript file somewhere but have not found any yet.
I downloaded the production SuiteCRM folder and did some diffing between production and dev code folders but am unable to find any differences that stick out.
I am not sure where to look next. Any help would be greatly appreciated.
Tony