Forums / Developer / wishlist - login - redirect - it goes wrong?

wishlist - login - redirect - it goes wrong?

Author Message

Fabricio Guerrero

Monday 05 March 2007 8:58:58 am

Hi,

I've come accross an issue with eZ wishlist + login + redirect that i can't find an easy fix for...

Currently if you want to use the wishlist you need to be logged on and if your not a form comes up and asks you to do so... which is cool but the issue is that after you logon it redirects you back to the page you came from which is usually the product page and not the complete wishlist. which is not much help. :(

The issue is that if you add:

<input type="text" name="RedirectURI" value="wishlist" />

into the login form it properly redirects but it does NOT add the product into the wishlist... seems as if it redirects right after loggin in and not going through the wishlist adding products code.. in other words it redirects too soon.. it should wait til after product is added.

If I try to do: <input type="text" name="RedirectURIAfterPublish" value="wishlist" />

nothing happens as it makes sense since I've read this only works when form action is set to "content/edit" and not for a login form.

I can only think of hacking the kernel a bit in order to make RedirectURIAfterPublish work with login or so...

maybe do something like: http://ez.no/ezpublish/documentation/customization/tips_tricks/redirecting_after_content_publishing

has any one got any good pointers??? come accross to a similar situation??

thanks,
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

Claudia Kosny

Monday 05 March 2007 2:34:20 pm

Hi Fabricio

That's looks quite tricky. The problem is that the wishlist needs the posted ContentObjectID and ezOption to add the product to the wishlist. And if you are redirected to the login page, the post data is lost.

A possible approach might be to hack the wishlist.php so it works with sessions as well and put the posted data in the session before the wishlist redirects to the login page.

Since you have already managed to get redirected back to the wishlist after login, the wishlist should then check for session variables, add the product and remove the session variables.

Maybe you should also just add the redirection to the wishlist if one of these session variables is set - after all you don't want to redirect to the wishlist every time someone logs in.

Claudia

Fabricio Guerrero

Tuesday 06 March 2007 12:28:54 am

Hi Claudia,

Thanks for this... it confirms what I suspected... i have to hack the kernel a bit to get this working...

I'll post the results here soon.

Thanks again.
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

eZ debug

Timing: Jan 19 2025 03:24:26
Script start
Timing: Jan 19 2025 03:24:26
Module start 'content'
Timing: Jan 19 2025 03:24:27
Module end 'content'
Timing: Jan 19 2025 03:24:27
Script end

Main resources:

Total runtime1.3605 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.9766180.8281
Module start 'content' 0.00541.2104 769.8047543.8125
Module end 'content' 1.21580.1446 1,313.6172336.7578
Script end 1.3604  1,650.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.2973210.0002
Check MTime0.00140.1064210.0001
Mysql Total
Database connection0.00070.052710.0007
Mysqli_queries1.281394.18301940.0066
Looping result0.00200.14611920.0000
Template Total1.327597.620.6637
Template load0.00240.174420.0012
Template processing1.325197.401120.6625
Template load and register function0.00020.013110.0002
states
state_id_array0.00090.065910.0009
state_identifier_array0.00200.150120.0010
Override
Cache load0.00200.1473310.0001
Sytem overhead
Fetch class attribute can translate value0.00110.080030.0004
Fetch class attribute name0.00120.088340.0003
XML
Image XML parsing0.00270.199530.0009
class_abstraction
Instantiating content class attribute0.00000.000850.0000
General
dbfile0.00850.6227270.0003
String conversion0.00000.000430.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs