Forums / Developer / upgrade to 3.8.x (drafts)

upgrade to 3.8.x (drafts)

Author Message

Andrew Kelly

Friday 04 August 2006 5:59:04 am

Reading the docs on upgrading from 3.7.x to 3.8.x I see the following:

You will need to either publish or remove all the unpublished drafts in your system before launching this script.

OK.
How?
I've seen forum posts going back 3 years or more by people who want to be able to log in as administrator (or use a script for that matter) and have immediate access to all pending drafts on the system. Is it really true that this is still not possible?
Why is fundamental functionality like this (or the ability to delete long finished collaboration tasks) still not present?

This software perports to be enterprise strength, so it's not off the wall to think that an installation could have hundreds of active content editors. Why on earth is there no administrative tool to look after these people and what they might be doing?

Has anybody out there written a script to delete drafts that they might want to share?

Andy

luis muñoz

Friday 04 August 2006 6:47:43 am

Hi Andrew,

If you want to delete all the drafts in your system you can modify de script update/common/scripts/updatemultilingual.php in 3.8.x distribution. The first thing the script does is delete all the drafts, take that part into a new file. It will delete all the drafts in your system.
The script makes a list of the current drafts so there should not be people publishing when the script is counting drafts.
It will be also a good idea to add a few sleep seconds between each iteration, if not the system will be really heavy loaded.
Remember doing a database backup before.

Good luck.

Luis

Helle Andersen

Friday 04 August 2006 7:49:10 am

But this is not quite the point - being able to delete ALL drafts.
The question is to get access as an administrator to e.g. drafts made by persons long gone. Sometimes these drafts can just be deleted sometimes they should actually be used. But I do not want to delete ALL drafts.
I have a similar problem with trash. It often happens that one user by mistake deletes an object made by someone else who is no longer employed. As an administrator I should be able to pull that object from trash, but this is not possible.
Helle

Kristof Coomans

Friday 04 August 2006 9:20:29 am

Hello guys

I once made a script to delete drafts, you can find it at http://pubsvn.ez.no/community/trunk/hacks/untoucheddrafts/bin/php/remove_drafts.php . It has a preview mode (dry run) in which you can see a list of users and the count of their drafts (by default sorted on draft count).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

kracker (the)

Sunday 07 January 2007 11:09:03 am

I think this thread is important to remember.

With so many upgrading to through from 3.7 =< 3.8 to 3.9, this is a useful tool.

//kracker

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

eZ debug

Timing: Jan 31 2025 00:27:16
Script start
Timing: Jan 31 2025 00:27:16
Module start 'content'
Timing: Jan 31 2025 00:27:16
Module end 'content'
Timing: Jan 31 2025 00:27:16
Script end

Main resources:

Total runtime0.2938 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.9219370.3047
Module start 'content' 0.00750.0122 958.22661,005.6406
Module end 'content' 0.01970.2741 1,963.86723,894.6875
Script end 0.2938  5,858.5547 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.3761200.0002
Check MTime0.00120.4184200.0001
Mysql Total
Database connection0.00070.240910.0007
Mysqli_queries0.204069.42401410.0014
Looping result0.00140.45971390.0000
Template Total0.273793.110.2737
Template load0.00070.249810.0007
Template processing0.273092.895710.2730
Override
Cache load0.00050.182110.0005
Sytem overhead
Fetch class attribute can translate value0.00160.552010.0016
XML
Image XML parsing0.00020.071810.0002
General
dbfile0.00822.7836200.0004
String conversion0.00000.001330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs