SubmitStuff.page.ItemData = function( config ) {
config = config || {};
Ext.applyIf( config, {
url : SubmitStuff.config.connectorsPath + "itemdb.php",
formpanel: "submitstuff-panel-item-data",
components: [ {
xtype : "submitstuff-panel-item-data",
renderTo : "submitstuff-panel-item-data",
id : config.id
} ],
buttons: [ {
process : "update",
text : _( "save" ),
method : "remote"
}, "-", {
process : "remove",
text : _( "delete" ),
method : "remote",
confirm : _( "remove_sub_conf" )
}, "-", {
processs : "cancel",
text : _( "cancel" ),
params : {
a : MODx.action["controllers/submitstuff.list"]
}
} ]
} );
SubmitStuff.page.ItemData.superclass.constructor.call( this, config );
};
Ext.extend( SubmitStuff.page.ItemData, MODx.Component );
Ext.reg( "submitstuff-page-item-data", SubmitStuff.page.ItemData );SubmitStuff.panel.ItemData = function( config ) {
config = config || {};
Ext.applyIf( config, {
url : SubmitStuff.config.connectorsPath + "itemdb.php",
baseParams : {},
id : "submitstuff-panel-item-data",
labelAlign : "left",
labelWidth : 145,
defaults : {
collapsible : true,
autoHeight : true
},
items : [ {
html : "<h2>" + _( "itemdb_sub" ) + "</h2>",
id : "submitstuff-item-header",
cls : "modx-page-header",
border : false
}, {
xtype : "portal",
items : [ {
columnWidth: .98,
items : [ {
title : _( "sub_content" ),
layout : "form",
defaults : {
border : false,
msgTarget : "side"
},
items: [ {
xtype : "hidden",
id : "item-sid",
name : "id",
value : config.id
}, {
xtype : "statictextfield",
fieldLabel : _( "item_id" ),
description : _( "desc_item_id"),
id : "item-id",
name : "item_id"
}, {
xtype : "textfield",
fieldLabel : _( "item_name" ),
description : _( "desc_item_name"),
id : "item-name",
name : "name"
} ]
} ]
} ]
} ],
listeners : {
"setup" : {
fn : this.setup,
scope : this
},
"beforeSubmit" : {
fn : this.beforeSubmit,
scope : this
},
"success" : {
fn : this.success,
scope : this
}
}
} );
SubmitStuff.panel.ItemData.superclass.constructor.call( this, config );
};
Ext.extend( SubmitStuff.panel.ItemData, MODx.FormPanel, {
setup : function() {
},
success : function( o ) {
},
beforeSubmit : function( o ) {
}
} );
Ext.reg( "submitstuff-panel-item-data", SubmitStuff.panel.ItemData );
[{
xtype : "submitstuff-panel-item-data",
renderTo : "submitstuff-panel-item-data",
id : config.id
}][{
xtype : "submitstuff-panel-item-data",
renderTo : "submitstuff-panel-item-data",
item : config.item
}]id : "submitstuff-panel-item-data",
this.fireEvent('ready',{ /* optional data obj here */ });
I’ve been at it for two days without any luck - you’re a lifesaver. 
$attr = array( ... 'action-nomenu' => array ( XPDO_TRANSPORT_PRESERVE_KEYS => false, XPDO_TRANSPORT_UPDATE_OBJECT => true, XPDO_TRANSPORT_UNIQUE_KEY => array ( 'namespace', 'controller' ), XPDO_TRANSPORT_RELATED_OBJECTS => false ), .... ); $action = $modx->newObject( 'modAction' ); $action->set( 'namespace', 'submitstuff' ); $action->set( 'parent', 0 ); $action->set( 'controller', 'controllers/submitstuff.itemview' ); $action->set( 'haslayout', 1 ); $action->set( 'lang_topics', 'submitstuff:itemdb' ); $action->set( 'assets', '' ); $actionVehicle = $builder->createVehicle( $action, $attr['action-nomenu'] ); $builder->putVehicle( $actionVehicle );
Try leaving out the XPDO_TRANSPORT_RELATED_OBJECTS => false and see. It may be that the presence of the key in the attributes is making it attempt to install them, even though the value is false.
It builds just fine, but when I install it using the package manager, I get an error along the lines of "could not install related objects for vehicle" (the wording isn’t exact). The action does get installed, but I wonder if maybe I’m just missing something here? Shouldn’t the "XPDO_TRANSPORT_RELATED_OBJECTS" set to false prevent it from looking for any "attached"objects? When I remove the action vehicle it works fine.
That did it, thanks a bunch Jason! Even though the error didn’t actually effect the install, that error was driving my crazy not knowing what was wrong.
Quote from: Ricjustsaid at Mar 31, 2009, 10:41 AMTry leaving out the XPDO_TRANSPORT_RELATED_OBJECTS => false and see. It may be that the presence of the key in the attributes is making it attempt to install them, even though the value is false.
It builds just fine, but when I install it using the package manager, I get an error along the lines of "could not install related objects for vehicle" (the wording isn’t exact). The action does get installed, but I wonder if maybe I’m just missing something here? Shouldn’t the "XPDO_TRANSPORT_RELATED_OBJECTS" set to false prevent it from looking for any "attached"objects? When I remove the action vehicle it works fine.