Monday 22 August 2011 2:32:56 pm
How many attributes does the class have and are you running sohusin? See: http://share.ez.no/blogs/steven-e.-bailey/protip-suhosin This will remove temporary drafts for all classes - might be useful to get out of the fubared state the class is in:
<?php
require 'autoload.php';
$cli = eZCLI::instance();
$script = eZScript::instance( array( 'description' => (
"Displays Class attributes of either [CLASS] or all classes" ),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) );
$script->startup();
$options = $script->getOptions( "", "[class]", array() );
$script->initialize();
$version = eZContentClass::VERSION_STATUS_TEMPORARY;
$temporaryClasses = eZContentClass::fetchList( $version, true );
if ( !$temporaryClasses ) {
echo "no draft(s)";
} else {
//eZContentClass::removeTemporary();
$db = eZDB::instance();
$db->begin();
foreach ( $temporaryClasses as $class )
{
echo $class->attribute('id')."\n";
$class->remove( true, $version );
}
$db->commit();
}
$script->shutdown();
?>
Certified eZPublish developer
http://ez.no/certification/verify/396111
Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com
|