function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MG ConsultingMG Consulting 

This component depends on another component that is not included in this package.

Hi,

 

I'm converting an old unmanaged package into a new managed packaged and I am running into an issue. I have an S-Control named Checklist_New, shown here:

<html>
<head>
<script type="text/javascript" language="javascript" src="/soap/ajax/9.0/connection.js"></script>
<script type="text/javascript" language="javascript">
<!--
function init() {
// Call the 'new checklist' page and set the save URL to our custom populate SControl.
// Always set the return URL to the checklist view page.
// Request.CF00N70000001aCWA contains entity name, if called from the entity
if ('{!$Request.CF00N70000001aCWA}' != '') {
window.parent.location.href = "{!URLFOR($Action.Checklist__c.New, null, [CF00N70000001aCWA=$Request.CF00N70000001aCWA, saveURL=URLFOR($SControl.Checklist_Populate, null, [retURL=URLFOR($Request.retURL, null, null, true)]), retURL=URLFOR($Request.retURL, null, null, true)], true)}";
} else {
window.parent.location.href = "{!URLFOR($Action.Checklist__c.New, null, [saveURL=URLFOR($SControl.Checklist_Populate, null, [retURL=URLFOR($Request.retURL, null, null, true)]), retURL=URLFOR($Request.retURL, null, null, true)], true)}";
}
}
// -->
</script>
</head>

<body onLoad="init()">
<p>&nbsp;</p>
</body>

</html>

 

 When I attempt to upload my package I get the following error:

Component Type Name Problem
Custom S-Control Checklist New This component depends on another component that is not included in this package.

 If I remove this S-Control from my package the upload is sucessful, but clearly this is not an option.

 

The S-Control Checklist_Populate and the Object  Checklist__c are both included in the package by Checklist_New.

 

I can't seem to think of anything else it could possible be dependant on so I'm thinking something quirky is going on here...

 

Any ideas?

 

Thanks a lot,

Mike

 

 

 

A_SmithA_Smith

The issue is caused by the inclusion of a salesforce ID in the body of the scontrol.  The component that ID is pointing to is not in the package, which is why you are receiving this error.  You should not include salesforce IDs in your scontrol as these are not stable from org to org.  Thus your scontrol would most likely break in a subscriber's organization.  Remove these ID references and then you should be able to upload the package.

 

CF00N70000001aCWA=$Request.CF00N70000001aCWA

 

Thanks,

blntblnt

I have a very similar problem with the following S-Control snippet. Can someone help?

 

Thanks

 

Bao-Long

 

/*
This snippet contains List Manager related Javascript.
*/

var listManagerHostURI = 'http://xxx.xxx.com';
var listManagerURL = listManagerHostURI + '/xxx/xxx';
var listManagerWindow;

// launchListManager will open up the List Manager in a popup
function launchListManager() {
if (BrowserDetect.browser != 'Firefox' || BrowserDetect.version < 3) {
alert('Notice: Your browser (' + BrowserDetect.browser + ' ' + BrowserDetect.version + ') is not currently supported. Firefox 3 or above is required for the Send to OMS button to work.');
} else {
listManagerWindow = window.open(listManagerURL, "ListManager_OMS", "height=850,width=1090,location=0,scrollbars=1");

// start listener
window.addEventListener("message", receiveMessage, false);
}
}

// receiveMessage will be used to receieve postMessage's from the List Manager
function receiveMessage(event) {
// only process messages received from listManagerHostURI
if (event.origin !== listManagerHostURI) {
return;
}

// only process messages from the listManagerWindow
if (event.source != listManagerWindow) {
return;
}

var source = getQueryVariableFromQueryString(event.data, "source");
var listId = decodeURIComponent(getQueryVariableFromQueryString(event.data, "listId"));
var listName = decodeURIComponent(getQueryVariableFromQueryString(event.data, "listName"));

// only process if the source is 'listmanager'
if (source == 'listmanager') {
var errorsOccurred = false;

if (listId == null) {
alert('Unable to receive List Id from List Manager. Please try again or contact support for assistance.');
errorsOccurred = true;
} else {
// make sure the listId is a number
if (isNaN(listId)) {
alert('Invalid List Id from List Manager (not a number).');
$("#listIdDisplay").html('');
document.getElementById('listManagerListId').value = '';
errorsOccurred = true;
} else {
$("#listIdDisplay").html('' + listId + '');
document.getElementById('listManagerListId').value = listId;
}
}

if (listName == null) {
alert('Unable to receive List Name from List Manager. Please try again or contact support for assistance.');
errorsOccurred = true;
} else {
// make sure the listName is not longer than 255
if (listName.length > 255) {
alert('Invalid List Name from List Manager (too long).');
$("#listNameDisplay").html('');
document.getElementById('listManagerListName').value = '';
errorsOccurred = true;
} else {
$("#listNameDisplay").html(listName);
document.getElementById('listManagerListName').value = encodeURIComponent(listName);
}
}

// if there were no errors, send an echo copy response of the data received
if (errorsOccurred == false) {
var toListManagerResponseString = 'source=oms&listId=' + encodeURIComponent(listId) +'&listName=' + encodeURIComponent(listName);
listManagerWindow.postMessage(toListManagerResponseString, listManagerHostURI);
}
}
}

// clear the List Manager list selections
function clearListManagerSelection() {
$("#listIdDisplay").html('');
document.getElementById('listManagerListId').value = '';

$("#listNameDisplay").html('');
document.getElementById('listManagerListName').value = '';
}

// this is a generic query string parser to get the value of a particular variable in a query string
function getQueryVariableFromQueryString(queryString, variable) {
var queryVars = queryString.split("&");

for (var i = 0; i < queryVars.length; i++) {
var indexOfEqual = queryVars[i].indexOf("=");
var key = queryVars[i].substr(0, indexOfEqual);
var value = queryVars[i].substr(indexOfEqual + 1);

if (key == variable) {
return value;
}
}
}

// launch list manager in View mode
function launchListManagerView(listId, withAppReferrer) {
var listManagerViewURL = listManagerHostURI + '/cece/list-management/?show=view&listId=' + listId;

if (withAppReferrer == true) {
if (BrowserDetect.browser != 'Firefox' || BrowserDetect.version < 3) {
alert('Notice: Your browser is not currently supported. Firefox 3 or above is required for the Send to OMS button to work.');
} else {
listManagerViewURL = listManagerViewURL + '&app_referrer=oms';

// start listener
window.addEventListener("message", receiveMessage, false);
}
}

listManagerWindow = window.open(listManagerViewURL, "ListManager_OMS", "height=850,width=1090,location=0,scrollbars=1");


}

// fetch list metadata by listManagerListIdsArray (NOTE: this function requires /soap/ajax/15.0/connection.js)
function fetchListMetaDataByListId(listManagerListIdsArray, callbackFunc, asynchronous) {
if (asynchronous == null) {
asynchronous = true;
}

try {
var xid = Math.random()*10000000000000000;
var midasPostData = 'listids=' + listManagerListIdsArray.join(',') + '&xid=' + xid;

sforce.connection.remoteFunction({
url : "http://xxx.xxx.com/midas/list_status?" + midasPostData,
requestHeaders: '',
requestData: midasPostData,
method: "POST",
async: asynchronous,
onSuccess : function(response) {
callbackFunc(response, true);
},
onFailure : function(response) {
callbackFunc(response, false);
},
timeout: 10000
});
} catch (e) {
alert(e);
}
}

// launch the previous used list manager lists lookup interface (an s-control)
function launchUsedListsLookup(proposalId) {
$("#previousLists").dialog('open');

var proposalLineItems = fetchPreviouslyUsedListManagerLists(proposalId);

// empty the table body first
$("#previousListsTableBody").empty();

// populate the table
var table = document.getElementById('previousListsTableBody');

var previouslyUsedLists = new Array();

if (proposalLineItems != false) {
// loop through to populate the table
for (var i = 0; i < proposalLineItems.records.length; i++) {
var listManagerListId = new Number(proposalLineItems.records[i].List_Manager_List_Id__c);
listManagerListId = listManagerListId.toString();
var listManagerListName = proposalLineItems.records[i].List_Manager_List_Name__c;

if (!previouslyUsedLists.hasOwnProperty(listManagerListId)) {
// create row
var tr = document.createElement("TR");

// create the TDs
var listIdTD = document.createElement("TD");
var listNameTD = document.createElement("TD");

// populate the TDs
listIdTD.innerHTML = listManagerListId;
listNameTD.innerHTML = '' + listManagerListName + '';

// append the TDs
tr.appendChild(listIdTD);
tr.appendChild(listNameTD);

table.appendChild(tr);

previouslyUsedLists[listManagerListId] = true;
}
}
} else {
// create row
var tr = document.createElement("TR");

// create the TDs
var noListsTD = document.createElement("TD");
noListsTD.colSpan = '2';

// populate the TDs
noListsTD.innerHTML = 'No previously used lists found.';

// append the TDs
tr.appendChild(noListsTD);
table.appendChild(tr);
}
}

function selectPreviousList(listId, listName) {
$("#listIdDisplay").html('' + listId + '');
document.getElementById('listManagerListId').value = listId;

$("#listNameDisplay").html(listName);
document.getElementById('listManagerListName').value = encodeURIComponent(listName);

// close the dialog
$("#previousLists").dialog('close');
}

function fetchPreviouslyUsedListManagerLists(proposalId) {
var qr = sforce.connection.query(
'Select Id, List_Manager_List_Id__c, List_Manager_List_Name__c '
+ ' From Proposal_Line_Item__c '
+ " Where Proposal__c = '" + proposalId + "' "
+ ' And List_Manager_List_Id__c != null');

if (qr.size > 0) {
if (qr.size==1) {
qr.records = [qr.records];
}

return qr;
} else {
return false;
}
}
Message Edited by blnt on 11-10-2009 05:18 PM
blntblnt
PS: All of the other JS libs that this script uses are included in the packages as well as the custom objects.
A_SmithA_Smith
After a quick scan of the code, I didn't see anything obvious.  Have you tried migrating your scontrol to Visualforce pages?  I suspect you won't have this issue with VF.
blntblnt

Thanks for looking at my code.

 

No, I have not tried migrating to VF. This is a snippet S-Control which is used in at least 3 other S-controls. So switching to VF at this point would mean re-writing lots of code. I would rather not do that at this point if I can avoid it.

 

 

JohnEekJohnEek

Hi,

 

I think I got an odd issue with the same topic. However, my message was as follow:

 

"This component depends on another component that is not included in this package. null"

 

Since the msg was not able to show me the depency name. I am totally scraching my head now. Thank you.

 

Regards,

 

John