How to stop content publishing during an upgrade process?

Author Message

Andrey Astakhov

Tuesday 10 June 2008 2:27:08 am

I'm going to upgrade my eZ Publish website from 3.8.4 to 4.0.
Unforunately this process is not very easy: many database and php scripts.

Users of my sites generate a lot of content: comments, forum messages, new users.

How to prevent any content publishing on frontend during an upgrade process?

It would be great to show some friendly message "Please wait until upgrade process finished" in every place where user can post message or comment.

Is the best way to achieve it to override edit and register templates?

Kristof Coomans

Tuesday 10 June 2008 5:55:45 am

Hi Andrey

One thing is showing a warning in the templates and hiding any buttons, another thing is really disabling the related views. Some hints that might get you started: http://ezpedia.org/wiki/en/ez/read_only_site. Instead of disabling module views that allow for changes to be made, you can also remove all policies that allow a user to make any changes from any assigned roles.

If you want to be completely sure that there are no modifications made to the database, I also recommend you to remove certain privileges from the database user (like INSERT, UPDATE, DELETE).

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

Gaetano Giunta

Tuesday 10 June 2008 2:03:32 pm

If you have got access to your webserver config (a plain .htaccess is enough), you could simply redirect all user requests to a courtesy.html page while the upgrade is in process

Principal Consultant International Business
Member of the Community Project Board

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 00:39:34
Script start
Timing: Jan 31 2025 00:39:34
Module start 'layout'
Timing: Jan 31 2025 00:39:34
Module start 'content'
Timing: Jan 31 2025 00:39:34
Module end 'content'
Timing: Jan 31 2025 00:39:34
Script end

Main resources:

Total runtime0.0231 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.4297151.2422
Module start 'layout' 0.00520.0037 739.6719220.7344
Module start 'content' 0.00890.0127 960.4063997.8984
Module end 'content' 0.02160.0015 1,958.304733.9922
Script end 0.0230  1,992.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.7259140.0002
Check MTime0.00114.5859140.0001
Mysql Total
Database connection0.00083.341810.0008
Mysqli_queries0.002510.896430.0008
Looping result0.00000.056810.0000
Template Total0.00114.710.0011
Template load0.00083.506110.0008
Template processing0.00031.144910.0003
Override
Cache load0.00062.383910.0006
General
dbfile0.00093.831680.0001
String conversion0.00000.031040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

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

Time used to render debug report: 0.0001 secs