No matter what I’ve tried, the two resources aren’t being installed. I get two error messages (see below). The two resource installation files are there and the install claims it was successful.
Here’s the build code for the resources:
/* Now we'll add the resources (documents) */
$i++;
$modx->log(MODX_LOG_LEVEL_INFO,"Creating resource: Contact Page<br />");
$r = $modx->newObject('modResource');
//$r->set('name','spfResponsePage');
//$r->set('class_key','modDocument');
$r->set('id',$i);
$r->set('type','modResource');
//$r->set('type','document');
$r->set('contentType','text/html');
$r->set('pagetitle','Contact');
$r->set('longtitle','Contact Us');
$r->set('description','Spam-proof Contact Form');
$r->set('alias','contact');
$r->set('published',1);
$r->set('parent',0);
$r->set('isfolder',0);
$r->setContent('[[!SPForm]]');
$r->set('richtext',0);
$r->set('menuindex',99);
$r->set('searchable',0);
$r->set('cacheable',1);
$r->set('menutitle','Contact Us');
$r->set('donthit',0);
$r->set('hidemenu',0);
$attributes= array(
XPDO_TRANSPORT_UNIQUE_KEY => 'name',
XPDO_TRANSPORT_UPDATE_OBJECT => true,
XPDO_TRANSPORT_PRESERVE_KEYS => false
);
$vehicle = $builder->createVehicle($r, $attributes);
$builder->putVehicle($vehicle);
Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'modResource.name' in 'where clause'
)