Quote from: BobRay at Dec 14, 2014, 10:49 PMYour transport.resources.php appears to be truncated. It should have more code at the end and finish with
Thanks Bob, but that was not the issue.
The code in my question got trucked, the full code is correct:
<?php
if (! function_exists('stripPhpTags')) {
function stripPhpTags($filename) {
$o = file_get_contents($filename);
$o = str_replace('<' . '?' . 'php', '', $o);
$o = str_replace('?>', '', $o);
$o = trim($o);
return $o;
}
}
/* @var $modx modX */
/* @var $sources array */
/* @var xPDOObject[] $resources */
$resources = array();
/* Other resources */
$properties = include $sources['data'].'properties/properties.support_theme_is_available_on_themesmodx.resource.php';
$resources[22]->setProperties($properties);
unset($properties);
$resources[23] = $modx->newObject('modResource');
$resources[23]->fromArray(array (
'id' => 23,
'type' => 'document',
'contentType' => 'text/html',
'pagetitle' => 'Ajax instant search included',
'longtitle' => '',
'description' => '',
'alias' => 'ajax-instant-search-included',
'link_attributes' => '',
'published' => true,
'isfolder' => false,
'introtext' => 'With the Support theme from ThemesMODX comes Ajax instant search included.',
'richtext' => true,
'template' => 'News article',
'menuindex' => 2,
'searchable' => true,
'cacheable' => true,
'createdby' => 2,
'editedby' => 2,
'deleted' => false,
'deletedon' => 0,
'deletedby' => 0,
'menutitle' => '',
'donthit' => false,
'privateweb' => false,
'privatemgr' => false,
'content_dispo' => 0,
'hidemenu' => false,
'class_key' => 'modDocument',
'context_key' => 'web',
'content_type' => 1,
'hide_children_in_tree' => 0,
'show_in_tree' => 0,
), '', true, true);
$resources[23]->setContent(file_get_contents($sources['data'].'resources/ajax_instant_search_included.content.html'));
$properties = include $sources['data'].'properties/properties.ajax_instant_search_included.resource.php';
$resources[23]->setProperties($properties);
unset($properties);
return $resources;