Forums / Developer / Forums and Workflow

Forums and Workflow

Author Message

Tony Wood

Wednesday 09 April 2003 6:36:34 am

Problem:
We are developing a forum site and we notice that when you post forms as an anonymous user with 'Approve' workflow enabled the default code causes problems.

To fix this we changed the code in kernel/content/edit.php line 226 from:
$module->redirectToView( 'view', array( 'sitemap', 2 ) );
to
$module->redirectToView( 'view', array( 'full', 144 ) );
This then directs to a set page that the anonymous user to a page they have access too.

The problem is that the node_id does is not available with workflow enabled so the page redirects to sitemap/2, this is not an allowed location, and eZ quite rightly asks for a login. This is not nice.

Request:
Can you please let me know if you can get the forms to post correctly with workflow enabled? Is thhere something we are missing? Does it need fixing?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Paul Forsyth

Wednesday 09 April 2003 10:34:15 am

Just to clarify this. The problem seems to be with the $node that gets assigned on line 202. It appears that $node is null and then the script redirects to the 'error' sitemap location.

Initial impressions are that the node is null because it has yet to be created. It will be created when the post is approved but this doesn't help with the redirect which will occur before that action takes place. Maybe the code should check the workflow requests?

Another point is that this code doesn't seem to respect the settings within site.ini.php where the default and error pages are defined.

Hope this helps

Paul

Sergiy Pushchin

Friday 11 April 2003 7:11:18 am

If I understood you write you should change line 226 in edit.php to:

$module->redirectToView( 'view', array( 'full', $version->attribute( 'main_parent_node_id' ) ) );

In that case behavour of system will be the same with approval workflow as it is without it.

--SP

Tony Wood

Friday 11 April 2003 7:20:02 am

Perfect... that just what we needed...
Is this going into the main 3.0 stable branch or do we need to keep a local patch?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Sergiy Pushchin

Friday 11 April 2003 8:10:32 am

I think I will commit it to stable.

eZ debug

Timing: Jan 29 2025 23:45:26
Script start
Timing: Jan 29 2025 23:45:26
Module start 'content'
Timing: Jan 29 2025 23:45:26
Module end 'content'
Timing: Jan 29 2025 23:45:26
Script end

Main resources:

Total runtime0.2104 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.8281180.8438
Module start 'content' 0.00580.0069 768.671997.8359
Module end 'content' 0.01270.1977 866.5078527.2344
Script end 0.2104  1,393.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00331.5669200.0002
Check MTime0.00130.6098200.0001
Mysql Total
Database connection0.00040.195910.0004
Mysqli_queries0.163477.63051410.0012
Looping result0.00110.51331390.0000
Template Total0.197293.710.1972
Template load0.00080.392010.0008
Template processing0.196393.290010.1963
Override
Cache load0.00050.257210.0005
Sytem overhead
Fetch class attribute can translate value0.00070.329810.0007
XML
Image XML parsing0.00030.155910.0003
General
dbfile0.00934.4155200.0005
String conversion0.00000.002830.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.0001 secs