Some functions on this portal require JavaScript but your browser does not support it or it has been disabled.
Skip to main content
Monday 22 August 2011 8:25:18 am - 2 replies
Steven E. Bailey
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
Philip K.
Tuesday 23 August 2011 12:13:41 am
Thanks a lot - after editing some suhosin variables editing classes is possible again.
Linux is like a wigwam; no windows, now gates, and apache inside!
You must be logged in to post messages in this topic!