HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


[RESOLVED] Login URL redirect issue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#70608 (In Topic #14924)
Avatar

Community saint

Firstly, this is a very low priority item for spare time (I must *grin* given some comments in another thread about Chris' time spent on ocPortal) only and given that the issue is potentially of my own creation: no time to look at it or not considered an ocPortal issue, no worries! I have worked around the issue with match-key anyway (just not displaying the content in the forum zone), so again, very low priority.

In my deployment I have moved the main_greeting and side_personal_stats into the header:



The issue is the login URL is not picking up the zone when creating the redirect after completion of successful login:

Code

http://freeourmoney.org/index.php?page=login&type=misc&redirect=http%3A%2F%2Ffreeourmoney.org%2Findex.php%3Fpage%3Dforumview

Should be something like:

Code

http://freeourmoney.org/index.php?page=login&redirect=http%3A%2F%2Ffreeourmoney.org%2Fforum%2Findex.php%3Fpage%3Dforumview%26type%3Dmisc

The join link is getting the zone:

Code

http://freeourmoney.org/index.php?page=join&redirect=http%3A%2F%2Ffreeourmoney.org%2Fforum%2Findex.php%3Fpage%3Dforumview%26type%3Dmisc%26id%3D1
but the URL build out is different so that would account for that:

Code

            $_redirect=build_url(array('page'=>'_SELF'));
            $redirect=$_redirect->evaluate();
            $login_url=build_url(array('page'=>'login','type'=>'misc','redirect'=>$redirect),get_module_zone('login'));
            $join_link=hyperlink($GLOBALS['FORUM_DRIVER']->join_link(),do_lang_tempcode('JOIN'));
            $login_link=hyperlink($login_url,do_lang_tempcode('LOGIN'));
            $_login_link=$login_link->evaluate();
            $_join_link=$join_link->evaluate();
            $p=do_lang_tempcode('WELCOME',do_lang_tempcode('A_OR_B',$_join_link,$_login_link));
            $out->attach(paragraph($p,'hhrt4dsgdsgd'));

and sadly not as easy as:

Code

$_redirect=build_url(array('zone'=>'_SELF','page'=>'_SELF'));
;)

In my case I can't use a redirect as I have some forum zone specific display stuff that breaks. Redirects have worked around the issue on other pages, so covered there.

TIA!


Last edit: by SoccerDad

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#70609
Avatar

Minor block cacheing block, shouldn't cache for Guests because the URLs may be different in different contexts. Hasn't come up before as people typically only use on one page.

Attachment
» Download: main_greeting.php (3 Kb, 119 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70612
Avatar

Community saint

Thanks for the quick turnaround Chris, much appreciated. Unfortunately issue is still present. Uploaded changed file, cleared caches and checked with a couple of different browsers. Also went to a couple of different zones to cover all the bases but zone not being picked up.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#70615
Avatar

As an experiment, what if &keep_cache=0 is in the URL, does it fix it?


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70617
Avatar

Community saint

Doesn't appear to:

URL from address bar (to be complete, tried with type=misc as well):

Code

http://freeourmoney.org/forum/index.php?page=forumview&keep_cache=0

Login URL:

Code

http://freeourmoney.org/index.php?page=login&type=misc&redirect=http%3A%2F%2Ffreeourmoney.org%2Findex.php%3Fpage%3Dforumview%26keep_cache%3D0&keep_cache=0
Join URL still AOK:

Code

http://freeourmoney.org/index.php?page=join&redirect=http%3A%2F%2Ffreeourmoney.org%2Fforum%2Findex.php%3Fpage%3Dforumview%26keep_cache%3D0&keep_cache=0

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#70658
Avatar

i could see another obvious issue in the code

Attachment
» Download: main_greeting.php (3 Kb, 112 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#70673
Avatar

Community saint

Chris, you are the man, that's the ticket, thanks kindly!

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: