Content object validation on publish

Author Message

Piotr Switkowski

Saturday 23 December 2006 2:59:03 pm

Hello
I need to run my own code to validate content object when it is published. I do it as event code. When content object is not correct I reject workflow in my code. This however displays only the text "Content publish cancelled" and I cannot present the error code. How can I display error message? Or display own template? Or even better, direct user back to edit screen?

Please help

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:23:26
Script start
Timing: Jan 31 2025 00:23:26
Module start 'layout'
Timing: Jan 31 2025 00:23:26
Module start 'content'
Timing: Jan 31 2025 00:23:26
Module end 'content'
Timing: Jan 31 2025 00:23:26
Script end

Main resources:

Total runtime0.0298 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.0063 588.1641151.2109
Module start 'layout' 0.00630.0045 739.3750220.6875
Module start 'content' 0.01080.0172 960.0625993.6953
Module end 'content' 0.02810.0017 1,953.757829.9922
Script end 0.0298  1,983.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00278.9397140.0002
Check MTime0.00113.6272140.0001
Mysql Total
Database connection0.00124.164410.0012
Mysqli_queries0.00227.460630.0007
Looping result0.00000.093510.0000
Template Total0.00124.210.0012
Template load0.00093.108310.0009
Template processing0.00031.032910.0003
Override
Cache load0.00061.921110.0006
General
dbfile0.00144.781680.0002
String conversion0.00000.032840.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