Hi,
I've populated some test pages with some random content using a script.
When I go in the admin I can see the content however when I view (or preview) the content I only get:
If I edit the content and commit (by adding and removing a space) then the content appears. I realise it may be the script but just in case it's not and someone has experienced this before i thought I'd ask.
Special thanks to Buggy for his script (sent to me a while back now). It strongly inspired my new one. And the content population is using the same loop. In case it is the script here is the bit:
// $new_page is a standard page just added with the create_page.php script
$childAssets = &$GLOBALS['SQ_SYSTEM']->am->getDependantChildren($new_page->id);
foreach ($childAssets as $childId => $childAssetType)
{
if ($childAssetType == "content_type_wysiwyg")
{ break; }
}
$child = &$GLOBALS['SQ_SYSTEM']->am->getAsset($childId, $childAssetType);
if (!$GLOBALS['SQ_SYSTEM']->am->acquireLock($childId, 'attributes'))
{
$GLOBALS['SQ_SYSTEM']->doTransaction('ROLLBACK');
trigger_error('Failed to acquire attributes lock for #' . $thisId . ' (' . $new_asset_type. ') '.trim($name), E_USER_WARNING);
return;
}
$html = $myContent; // string containing random content
if (!$child->setAttrValue("html", $html))
{
$GLOBALS['SQ_SYSTEM']->doTransaction('ROLLBACK');
trigger_error('Failed to upload HTML for #' . $thisId . ' (' . $new_asset_type. ') '.trim($name), E_USER_WARNING);
return;
}
$child->saveAttributes();
$GLOBALS['SQ_SYSTEM']->am->releaseLock($childId, 'attributes');Any help appreciated.
Cheers.