Running with Tridion’s Contented Transportation API tin beryllium extremely almighty, enabling dynamic contented position tailor-made to circumstantial wants. Nevertheless, builders generally brush sudden hurdles. 1 communal content arises once utilizing the getListItemXmlAttributes
methodology successful Database views, peculiarly once dealing with kid work objects. This tin pb to irritating errors and roadblocks successful your improvement procedure. This station delves into the nuances of this job, exploring its base causes and offering applicable options to aid you navigate this difficult terrain and physique sturdy, dependable Tridion implementations.
Knowing the getListItemXmlAttributes Technique
The getListItemXmlAttributes
technique is indispensable for retrieving metadata related with objects successful a Database position. This metadata tin beryllium important for customizing the show and behaviour of database objects. Nevertheless, once kid work gadgets are active, the methodology tin typically neglect to retrieve the anticipated attributes, throwing errors oregon returning null values.
This content frequently stems from however Tridion handles inheritance and constituent linking successful the discourse of Database views. Kid publications whitethorn inherit elements from genitor publications, and the relationships betwixt these elements tin contact the behaviour of getListItemXmlAttributes
. Knowing these relationships is cardinal to resolving the content.
A communal script includes utilizing a Dynamic Constituent Position (DCP) inside a Database position. If the DCP depends connected circumstantial constituent metadata, and that metadata isn’t decently resolved for kid work gadgets, the getListItemXmlAttributes
technique mightiness neglect. This tin manifest successful assorted methods, from exceptions to merely not displaying the desired accusation.
Communal Causes of the Content
Respective elements lend to the nonaccomplishment of getListItemXmlAttributes
with kid work gadgets. 1 predominant offender is incorrect constituent linking. If the hyperlinks betwixt elements successful genitor and kid publications are not decently configured, the technique whitethorn not beryllium capable to entree the essential metadata.
Different communal origin is template mismatches. If the templates utilized successful the genitor and kid publications are inconsistent oregon person conflicting metadata definitions, this tin besides pb to issues with getListItemXmlAttributes
.
Moreover, caching points tin typically exacerbate the job. Outdated cached information tin pb to inconsistencies and surprising behaviour. Clearing the cache tin frequently resoluteness these points, however itβs indispensable to place and code the underlying origin.
Troubleshooting and Options
Once confronted with this content, location are respective troubleshooting steps you tin return. Archetypal, confirm the constituent linking betwixt the genitor and kid publications. Guarantee that the parts are accurately linked and that the essential metadata is disposable successful the kid work.
- Cheque Constituent Linking: Validate that parts are accurately linked betwixt genitor and kid publications. 3. Reappraisal Templates: Guarantee consistency betwixt templates utilized successful genitor and kid publications, particularly relating to metadata definitions. 5. Broad Caches: Broad the Tridion cache to destroy possible points with outdated information. Typically a afloat exertion excavation recycle is essential. Adjacent, analyze the templates utilized successful some publications. Expression for immoderate inconsistencies oregon conflicts successful metadata definitions. Guarantee that the templates are designed to grip kid work gadgets accurately.
Clearing the Tridion cache tin besides beryllium adjuvant. Outdated cached information tin generally origin surprising behaviour. Clearing the cache tin unit Tridion to retrieve caller information and resoluteness immoderate inconsistencies.
Present are any cardinal concerns for stopping this content:
- Accordant Template Plan: Usage a accordant attack to metadata definitions crossed each templates.
- Thorough Investigating: Trial your implementation totally successful some genitor and kid publications to drawback possible points aboriginal.
Champion Practices for Running with Database Views and Kid Publications
To debar encountering this content successful the archetypal spot, travel these champion practices:
- Found a broad and accordant metadata schema crossed your publications.
- Totally trial your Database position implementations successful some genitor and kid publications.
- Instrumentality sturdy mistake dealing with to gracefully negociate immoderate sudden points.
By adhering to these practices, you tin reduce the hazard of encountering issues with getListItemXmlAttributes
and guarantee the creaseless cognition of your Tridion implementation. A fine-outlined contented exemplary and rigorous investigating are important for occurrence.
See leveraging the powerfulness of the Tridion assemblage for further activity and assets. Sharing your experiences and options tin payment another builders dealing with akin challenges.
Running with Inherited Contented
Once dealing with inherited contented, wage adjacent attraction to however metadata is inherited and however it interacts with your Database views. Guarantee that your templates are designed to grip inherited metadata appropriately and that your Database views are configured to retrieve the due attributes. This volition aid forestall sudden behaviour and guarantee the close show of accusation.
Retrieve that broad documentation is paramount. Documenting your implementation, together with however you grip metadata inheritance and Database views, tin prevention you clip and attempt successful the agelong tally. This documentation tin beryllium invaluable for troubleshooting and early improvement.
For deeper insights into Tridion improvement, mention to the authoritative SDL documentation and assemblage boards. These sources supply invaluable accusation and champion practices for running with Tridion and tin aid you flooded assorted challenges.
Outer Assets:
[Infographic Placeholder: Illustrating the relation betwixt genitor and kid publications and however metadata is inherited.]
Often Requested Questions
Q: However tin I find if the content is associated to caching?
A: Attempt clearing the Tridion cache and restarting the exertion excavation. If the content resolves, it was apt cache-associated. Nevertheless, this is a impermanent hole; analyze the underlying origin to forestall recurrence.
Efficiently running with Tridion’s getListItemXmlAttributes
technique successful the discourse of kid publications requires a heavy knowing of however Tridion handles inheritance and constituent linking. By cautiously contemplating these elements and implementing the options and champion practices outlined successful this station, you tin debar communal pitfalls and physique strong and dependable Tridion implementations. Retrieve that proactive readying, thorough investigating, and broad documentation are cardinal to occurrence. Exploring sources similar the SDL documentation and partaking with the Tridion assemblage tin additional heighten your experience and aid you navigate the complexities of Tridion improvement. See exploring associated subjects similar template improvement, constituent linking methods, and precocious caching methods to additional heighten your Tridion abilities.
Question & Answer :
I person created a JS people to populate SG/Folder database position information, once objects are modified. (Arsenic per Jaime’s attack) All the pieces plant large once I run connected objects successful the work they’re created successful.
Ex: I unfastened a constituent oregon leaf and the customized locked by
file instantly updates and reveals my person sanction.
Nevertheless, once I spell to a kid work and repetition that procedure, I acquire the framework asking if I privation to localize oregon edit the genitor point. If I choice to edit the genitor framework, the codification doesn’t activity. I haven’t rather figured it retired but with first debugging. Chrome appears to swallow the mistake, Firefox provides maine a cryptic:
Timestamp: 6/22/2012 three:forty two:fifty four P.m.
Mistake: uncaught objection: [Objection… “Constituent returned nonaccomplishment codification: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]” nsresult: “0x80004002 (NS_NOINTERFACE)” determination: “JS framework :: chrome://browser/contented/tabbrowser.xml :: :: formation 545” information: nary]
Does anybody person immoderate first ideas? I’ll attempt to station any codification future connected…
Codification from PageEx.js:
Kind.registerNamespace("MyCompany.Tridion.RTFExtensions"); /* * Constructor */ MyCompany.Tridion.RTFExtensions.PageEx = relation (id) { Kind.enableInterface(this, "MyCompany.Tridion.RTFExtensions.PageEx"); this.addInterface("Tridion.ContentManager.Leaf", [id]); var p = this.properties; p.versionNumberString = undefined; p.modifiedBy = undefined; p.lockedBy = undefined; p.approvalStatus = undefined; p.publishDate = undefined; p.previousVersion = undefined; p.previousApprovalStatus = undefined; p.customModifiedDate = undefined; p.initialModifierUserName = undefined; }; /* * sends the database xml drawstring for the point */ MyCompany.Tridion.RTFExtensions.PageEx.prototype.getListItemXmlAttributes = relation (customAttributes) { var attribs = {}; $extUtils.getListItemXmlAttributes(customAttributes,this, attribs); instrument this.callBase("Tridion.ContentManager.Leaf", "getListItemXmlAttributes", [attribs]); }; /* * This methodology will get referred to as once an point is opened from database position. node parameter has the accusation * displayed successful the database position arsenic attributes. We are getting cutom information extender file accusation * from this xml node and storing it successful this people associate for returning it from getListItemXmlAttributes methodology */ MyCompany.Tridion.RTFExtensions.PageEx.prototype.setDataFromList = relation (node, parentId, timeStamp) { $extUtils.setDataFromList(node,parentId,timeStamp,this); this.callBase("Tridion.ContentManager.Leaf", "setDataFromList", [node, parentId, timeStamp]); }; /* * Will get point icon */ MyCompany.Tridion.RTFExtensions.PageEx.prototype.getItemIcon = relation () { var icon = this.callBase(this.defaultBase, "getItemIcon"); instrument icon; };
Codification from utils.js:
// reloads the database position for the fixed id (utilized successful database position information refresh once JS cant acquire the required information with out reloading) MyCompany.Tridion.RTFExtensions.Utilities.reloadListView = relation (listTcmId) { var registry = $fashions.getListsRegistry(); for(var cardinal successful registry) { var introduction = $fashions.getItem(registry[cardinal]); if (introduction && introduction.getParentId() == listTcmId) { introduction.unload(); instrument actual; } } instrument mendacious; } /* * This technique will get known as once an point is opened from database position. node parameter has the accusation * displayed successful the database position arsenic attributes. We are getting cutom information extender file accusation * from this xml node and storing it successful this people associate for returning it from getListItemXmlAttributes technique */ MyCompany.Tridion.RTFExtensions.Utilities.setDataFromList = relation (node, parentId, timeStamp, itemClicked) { var p = itemClicked.properties; if (!timeStamp || timeStamp > itemClicked.getTimeStamp()) { var tmp; if (tmp = node.getAttribute('Interpretation')) { p.versionNumberString = tmp; p.previousVersion = tmp; } if (tmp = node.getAttribute('ModifiedBy')) { p.modifiedBy = tmp; p.initialModifierUserName = tmp; } if (tmp = node.getAttribute('LockedBy')) { p.lockedBy = tmp; } if (tmp = node.getAttribute('ApprovalStatus')) { p.approvalStatus = tmp; p.previousApprovalStatus = tmp; } if (tmp = node.getAttribute('PublishDate')) { p.publishDate = tmp; } if (p.customModifiedDate === undefined) { if (tmp = node.getAttribute('Modified')) { p.customModifiedDate = tmp; } } } } /* * sends the database xml drawstring for the point successful the database position. */ MyCompany.Tridion.RTFExtensions.Utilities.getListItemXmlAttributes = relation (customAttributes, listViewObject,attribs) { var p = listViewObject.properties; $extUtils.getListViewItemLockedByName(p,listViewObject); if (customAttributes) { for (var attr successful customAttributes) { attribs[attr] = customAttributes[attr]; } } attribs["Interpretation"] = $extUtils.getListViewItemUpdatedVersion(p,listViewObject); //modified sanction has to travel last the interpretation replace... $extUtils.getListViewItemModifiedByName(p,listViewObject); attribs["ApprovalStatus"] = $extUtils.getListViewItemApprovalStatus(p,listViewObject); attribs["PublishDate"] = $extUtils.getListViewItemPublishDate(p,listViewObject); //fit default values if (p.versionNumberString != undefined) { var iResult = p.versionNumberString.localeCompare(p.previousVersion); if (p.previousVersion === undefined || iResult > zero) { //it's been up to date! p.previousVersion = p.versionNumberString; p.previousApprovalStatus = p.approvalStatus; //besides demand to replace modified day p.customModifiedDate = $extUtils.getListViewItemUpdatedModifiedDate(p,listViewObject); p.initialModifierUserName = p.modifiedBy; } } attribs["Modified"] = p.customModifiedDate; attribs["LockedBy"] = p.lockedBy; attribs["ModifiedBy"] = p.modifiedBy; }; /* * This methodology units the place of the Revisor proprietor connected the point successful the database position. nevertheless, if it's not the actual person * we person nary manner to expression that ahead successful JS truthful we person to reload the database position. */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemModifiedByName = relation (p,listViewObject) { var p = listViewObject.properties; var xmlDoc = listViewObject.getXmlDocument(); if (xmlDoc) { //modifier ought to ever be... var modifierId = $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Information/tcm:VersionInfo/tcm:Revisor/@xlink:rubric"); if (modifierId != undefined) { var u = Tridion.UI.UserSettings.getJsonUserSettings(actual); if (modifierId == u.Person.Information.Sanction) { var strDescription = u.Person.Information.Statement.divided('('); p.modifiedBy = strDescription[zero]; instrument; } other { //we're successful problem... //fto's anticipation it's the first modifier we had... if (p.previousVersion == p.versionNumberString) { //whew... p.modifiedBy = p.initialModifierUserName; instrument; } if (!$extUtils.reloadListView(listViewObject.getOrganizationalItemId())) { //hrm. thing failed connected the reload? not certain what other to bash: p.modifiedBy = modifierId; } } } other { //shouldn't always hap. p.modifiedBy = ""; instrument; } } }; /* * This technique units the place of the fastener proprietor connected the point successful the database position. nevertheless, if it's not the actual person * we person nary manner to expression that ahead successful JS truthful we person to reload the database position. */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemLockedByName = relation (p,listViewObject) { var xmlDoc = listViewObject.getXmlDocument(); if (xmlDoc) { //this volition beryllium person id. nary awareness getting tcmid... tin't expression it ahead with out async call var lockedUserId = $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Data/tcm:VersionInfo/tcm:ItemLock/tcm:Person/@xlink:rubric"); if (lockedUserId != undefined) { //seat if it's the actual person. about apt... var u = Tridion.UI.UserSettings.getJsonUserSettings(actual); if (lockedUserId == u.Person.Information.Sanction) { var strDescription = u.Person.Information.Statement.divided('('); p.lockedBy = strDescription[zero]; instrument; } //it's not the actual person. nary synch manner to bash what we privation, positive the JS call doesn't acquire the workflow interpretation anyhow. refresh the genitor position if (!$extUtils.reloadListView(listViewObject.getOrganizationalItemId())) { //hrm. thing failed connected the reload? not certain what other to bash: p.lockedBy = lockedUserId; } } other { //broad it retired since location's nary fastener proprietor p.lockedBy = ""; } } }; /* * Will get the ApprovalStatus from the point * This makes perfectly nary awareness... however for any ground the support position will get wiped retired once this methodology * enters. truthful I had to usage a "former support position" adaptable to keep it. nary thought wherefore. I don't seat thing * other that ought to beryllium touching it... however intelligibly thing clears it retired. */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemApprovalStatus = relation (p,listViewObject) { //cheque if the point has really been modified. if (p.versionNumberString != p.previousVersion) { var xmlDoc = listViewObject.getXmlDocument(); if (xmlDoc) { p.approvalStatus = $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Data/tcm:Information/tcm:ApprovalStatus/@xlink:rubric"); } } other { p.approvalStatus = p.previousApprovalStatus; } if (p.approvalStatus === undefined || p.approvalStatus.toUpperCase() == 'UNAPPROVED') { var foo = p.approvalStatus; p.approvalStatus = 'WIP'; } instrument p.approvalStatus; }; /* * Will get the PublishDate from the point database position */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemPublishDate = relation (p,listViewObject) { //modification gained't change print day. var p = listViewObject.properties; instrument p.publishDate; }; /* * acquire the modified day for the workflow interpretation, overwrite OOB since that makes use of past great interpretation */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemUpdatedModifiedDate = relation (p,listViewObject) { var xmlDoc = listViewObject.getXmlDocument(); var modDate = $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Information/tcm:VersionInfo/tcm:RevisionDate"); instrument modDate; } /* * Will get the up to date Interpretation accusation from the point */ MyCompany.Tridion.RTFExtensions.Utilities.getListViewItemUpdatedVersion = relation (p,listViewObject) { var p = listViewObject.properties; var xmlDoc = listViewObject.getXmlDocument(); var newVersionString = undefined; if (xmlDoc) { newVersionString = Drawstring.format("{zero}.{1}", $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Information/tcm:VersionInfo/tcm:Interpretation"), $xml.getInnerText(xmlDoc, "/tcm:*/tcm:Data/tcm:VersionInfo/tcm:Revision")); } if (newVersionString != undefined) { //privation to guarantee we're getting a Future interpretation than we had (due to the fact that it volition attempt to burden the non-workflow interpretation afterwards... var iResult = newVersionString.localeCompare(p.previousVersion); if (p.previousVersion === undefined || iResult > zero) { p.versionNumberString = newVersionString; } other { p.versionNumberString = p.previousVersion; } } other { p.versionNumberString = p.previousVersion; } instrument p.versionNumberString; }; relation launchPopup(winURL, winName, winFeatures, winObj) { // this volition clasp our opened framework var theWin; // archetypal cheque to seat if the framework already exists if (winObj != null) { // the framework has already been created, however did the person adjacent it? // if truthful, past reopen it. Other brand it the progressive framework. if (!winObj.closed) { winObj.direction(); instrument winObj; } // other autumn done to the codification beneath to re-unfastened the framework } // if we acquire present, past the framework hasn't been created but, oregon it // was closed by the person. theWin = framework.unfastened(winURL, winName, winFeatures); instrument theWin; } var $extUtils = MyCompany.Tridion.RTFExtensions.Utilities;
[Objection… “Constituent returned nonaccomplishment codification: 0x80004002 (NS_NOINTERFACE) [nsIWebProgress.DOMWindow]”
This means that location was nary framework assigned to the nsIWebProgress entity. Truthful it has obscurity to show information.
nsresult: “0x80004002 (NS_NOINTERFACE)” determination: “JS framework :: chrome://browser/contented/tabbrowser.xml :: :: formation 545” information: nary]
This is telling you what record is related with that mistake. and what formation it faulted connected.
However the existent cardinal is the NS_NOINTERFACE mistake. Which means the interface has not been registered.
You are utilizing Kind.enableInterface()
. Is that a customized technique you are declaring location other ? I don’t seat it. You mightiness privation to alteration that to .registerInterface()
Seat this nexus Kind People and Kind.registerInterface()