link to last published object in confirmation

Author Message

Robert Malevic

Friday 02 October 2009 7:55:39 am

Hi All,

When an anonymous user publishes an object via a form the user is redirected to a confirmation page. Depending on the value of some checkboxes the confirmation page provides feedback to the visitor.

To get these values I fetch the last published object

{def $last_published = fetch( 'content', 'list', hash( 'parent_node_id', 11184,
                                                                    'sort_by', array( 'modified', false() ),
                                                                    'limit', 1 )) }

By doing so I don't get the values in the object just published by the anonymous user but the values of the previous object.

How to solve this so I can retrieve values entered by the anonymous user?

Thanks!

Ɓukasz Serwatka

Friday 02 October 2009 8:08:26 am

Hi,

That confirmation page, is that a view cached node or custom module view? If you want to get last published node, then it is better to sort by 'published' keyword.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Robert Malevic

Friday 02 October 2009 8:24:20 am

I tried both published and modified, so it seems caching is the problem, but how to disable the view cache in the confirmation?
I'm still struggling with all the cache options :-)

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 18 2025 15:08:19
Script start
Timing: Jan 18 2025 15:08:19
Module start 'layout'
Timing: Jan 18 2025 15:08:19
Module start 'content'
Timing: Jan 18 2025 15:08:19
Module end 'content'
Timing: Jan 18 2025 15:08:19
Script end

Main resources:

Total runtime0.6778 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1563152.6406
Module start 'layout' 0.00570.0034 741.796939.4766
Module start 'content' 0.00910.6673 781.2734535.5391
Module end 'content' 0.67640.0014 1,316.812512.1250
Script end 0.6777  1,328.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5034160.0002
Check MTime0.00140.2130160.0001
Mysql Total
Database connection0.00130.187810.0013
Mysqli_queries0.631993.2267570.0111
Looping result0.00060.0835550.0000
Template Total0.649595.820.3247
Template load0.00200.301420.0010
Template processing0.647495.518620.3237
Template load and register function0.00030.050910.0003
states
state_id_array0.00080.114610.0008
state_identifier_array0.00080.121820.0004
Override
Cache load0.00170.2505170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.079120.0003
Fetch class attribute name0.00150.226240.0004
XML
Image XML parsing0.00070.101120.0003
class_abstraction
Instantiating content class attribute0.00000.001840.0000
General
dbfile0.00070.1101180.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs