Forums / Developer / Redirect after delete?

Redirect after delete?

Author Message

Eric Weik

Friday 18 February 2005 8:28:20 am

Does anyone know of a way to redirect after deleting a content object?

For most "edit" forms you can use:

<input type="hidden" name="RedirectURI" value={concat('content/view/full/',$object.main_node_id)|ezurl} />

OR if you need to specify the URI from a step prior to the edit form you can use:

<input type="hidden" name="RedirectURIAfterPublish" value={concat('content/view/full/',$node.node_id)|ezurl} />

However, neither of these work after deletion.

After poking around a bit, I see some checks for "RedirectIfDiscarded", but these look like they are for discarding a draft. I want to actually redirect after deleting an object that is in the node tree.

Any ideas?

Lazaro Ferreira

Friday 18 February 2005 9:25:29 am

Hi,

It seems like there isn't an out-the-box parameter like this to redirect after object deletion, normally you can't remove an object from edit page, you can only store or discard the draft of the object

You can remove or delete the object from view full or as part of the view full of its container, ezpublish will redirect to a delete confirmation page after you click on delete button, then ezp will internally redirect to the view of the container node

So it seems like there isn't a simple way of doing it (without some programming)

Lazaro
http://www.mzbusiness.com

Eric Weik

Friday 18 February 2005 1:34:12 pm

Hi Lazaro,

I am trying to delete from full view (not an edit view), but my problem is that I'm trying to delete a child of a child (this is for a user-editable imaging application).

The application involves a a "Big Box" that contains a series of "Little Boxes", each of which contains a series of "Widgets". "Big Box" calls the line view of of "Little boxes", each of which call the line view of their "Widgets". The line view of the "Widgets" have "edit" and "delete" buttons. These work fine, but after deleting a "Widget", you end up looking at a "Little Box" full view. I'm trying to keep the user in the "Big Box".

This model is great for making an easy-to-use user interface, but has proved problematic for both deletion and view-caching (I've yet to figure out a way to make adding Widgets to Little Boxes properly update the Big Box view).

Anyhow, should anyone else encounter this problem, my solution for now is to use the "Redirect Operators" contribution. Because my Little Boxes are always visible from Big Boxes, there is no need for the user to EVER see the full-view of a Little Box, so it redirects to back to the Big Box full view.

http://www.ez.no/community/contribs/template_plugins/redirect_operators

I've also entered this as a "new enhancement" request:
http://ez.no/bugs/view/6229

-Eric

eZ debug

Timing: Jan 31 2025 03:27:52
Script start
Timing: Jan 31 2025 03:27:52
Module start 'content'
Timing: Jan 31 2025 03:27:52
Module end 'content'
Timing: Jan 31 2025 03:27:52
Script end

Main resources:

Total runtime0.2354 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.0104 587.8281370.3047
Module start 'content' 0.01040.0116 958.13281,005.6094
Module end 'content' 0.02200.2133 1,963.74223,894.4141
Script end 0.2353  5,858.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00441.8671200.0002
Check MTime0.00140.5851200.0001
Mysql Total
Database connection0.00080.345010.0008
Mysqli_queries0.140159.51641410.0010
Looping result0.00140.57731390.0000
Template Total0.212990.410.2129
Template load0.00080.354710.0008
Template processing0.212090.079410.2120
Override
Cache load0.00060.248610.0006
Sytem overhead
Fetch class attribute can translate value0.00210.899810.0021
XML
Image XML parsing0.00030.118910.0003
General
dbfile0.00753.1729200.0004
String conversion0.00000.002230.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