Logging in ignores current /layout/set URI

Author Message

Dan C

Tuesday 29 March 2005 2:08:53 pm

Hi,

Here's my situation:
If I'm browsing on my site at:

http://www.example.com/layout/set/mylayout/mymodule/view/42

and I click to login from that page, after I login I'm redirected to:

http://www.example.com/mymodule/view/42

instead of the original url. Does anyone know a workout or a fix for this? I looked into kernel/user/login.php and user/login.tpl and theres a UserRedirectURI variable that might do what I'm looking for but I'm not sure how to set it.

Any advice would be greatly appreciated

Thanks,

Dan

Łukasz Serwatka

Tuesday 29 March 2005 11:51:07 pm

Hi Dan,

Could you paste xhtml output from

<input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" /> 

Probadly redirect_uri is wrong.

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

Dan C

Wednesday 30 March 2005 3:59:05 am

It's the same:

Mine:
<input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" />
Yours:
<input type="hidden" name="RedirectURI" value="{$User:redirect_uri}" /> 

Any ideas?

Dan

Łukasz Serwatka

Wednesday 30 March 2005 4:03:06 am

What is the output from {$User:redirect_uri} variable when you accessing http://www.example.com/layout/set/mylayout/mymodule/view/42

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

Dan C

Wednesday 30 March 2005 6:21:29 am

http://www.example.com/layout/set/mylayout/mymodule/view/42

has a link to http://www.example.com/user/login

and the output of {$User:redirect_uri} is:

<input type="hidden" name="RedirectURI" value="" />

Dan C

Monday 02 May 2005 7:29:45 pm

I hacked up a solution to call a function in a module.. that returns _SERVER['HTTP_REFERER'] which i put into the UserRedirect hidden field... this is really hackish and I would prefer a proper solution but going through the ezpublish code is too daunting.

I have some vague idea that it has to do with lib/ezutils/ezuri.php and perhaps even kernel/user/login.php but I can't find where the layout/set URI part is stored.

Maybe this was fixed after 3.5.0? Can someone backport the necessary changes?

Thanks,

Dan

Lo' F.

Tuesday 31 May 2011 7:08:02 am

Old post but I had the same issue: after logging in I was redirected to the home while I wanted to be redirected to the last visited page.

{$User:redirect_uri|wash} did not output anything but an empty value.

So just figured out this as the easiest way..

<input type="hidden" name="RedirectURI" value="{ezhttp( 'LastAccessesURI', 'session' )}" />

..Cheers!

loredanaebook.it

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 02:04:39
Script start
Timing: Jan 18 2025 02:04:39
Module start 'layout'
Timing: Jan 18 2025 02:04:39
Module start 'content'
Timing: Jan 18 2025 02:04:40
Module end 'content'
Timing: Jan 18 2025 02:04:40
Script end

Main resources:

Total runtime1.0376 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 588.0469152.6406
Module start 'layout' 0.00780.0034 740.687539.4766
Module start 'content' 0.01121.0251 780.1641626.8906
Module end 'content' 1.03630.0013 1,407.054716.1250
Script end 1.0375  1,423.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3072160.0002
Check MTime0.00130.1289160.0001
Mysql Total
Database connection0.00080.072710.0008
Mysqli_queries0.971393.6079710.0137
Looping result0.00070.0673690.0000
Template Total1.000396.420.5002
Template load0.00200.195920.0010
Template processing0.998396.207720.4991
Template load and register function0.00020.019810.0002
states
state_id_array0.00130.123310.0013
state_identifier_array0.00090.091320.0005
Override
Cache load0.00180.1697450.0000
Sytem overhead
Fetch class attribute can translate value0.00050.052830.0002
Fetch class attribute name0.00140.130390.0002
XML
Image XML parsing0.00110.109930.0004
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00120.1126240.0000
String conversion0.00000.001040.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs