• Index
  • » Users
  • » colinM
  • » Posts

Posts

Posts

TitleHave had various reports of login failures. These all relate to very new Apples tablets and Mac devices.

Compatibility have been usung SCLogin most successfully for many years on a Joomla! 2.5 site (V2.5.28).  The time has come at last to update to the Joomla! 3 series.  Presently I am using an old version 4.3.3.  If I update this to the latest version (V7.2.2) will iwork on the existing Joomla 2.5.28 and on Joomla! 3.8.x after the migration (via Joomla! 3.5.1).
Thanks
Colin

Embarrassment!  I was using an older version - stupid, I did not check as is my usual practice.  Can we get rid of this chain?

Just for the record it does go to the home page if logging out whilst viewing a 'privileged page'.

Have found Captcha stuff is not displaying if asking for re-send/renew of login name or p/w but I need to check (double check!!) it is not me before raising query.  And search forum of course.

Again humble apologies
Colin

Hi
I have checked on id code for public and indeed it is the standard value of 1.  In all cases where it is public then all is very good. 
I have two cases, both of which fail, as below.
(1) Log out whilst viewing a registered atrtcle, called from a menu item which has a view access calledd 'standard-edit' with id = 7.  Also tried this with calling menu as public but gave same result.
(2) Log out whilst viewing a component called from a menu which had view access edit-standard. 
I investigated this case a bit more deeply and was led to routine  SCLibraryUtilities::isMenuRegistered called from function getLinkFromMenuItem, both in sc_helper.php.  As you said isMenuRegistered tests against the fixed value "1" and returns true if != "1", indicating menu has restricted viewing access that will disappear on logging out.  getLinkFromMenuItem identifies if called from a regular "registered or above" menu item.  It then sets up $link with 'index.php'   Think this does not always resolve to the home address.  I will look further.
Colin

Registered and above users have access to pages not visible to 'guests'.  I have setup that  on log-out it goes to 'same page'.  This works excellently except, as would be expected, when the page being examined is restricted to being viewed by registered or above only. In that circumstance it goes to the default Joomla log-in page.  It would be much better if one could still define another default page.  Going to the Home page would be a reasonable automatic alternate.  Going to the default login page is the worst possible state as it comes up with the message about you need to login first!!
Colin

Hi
I find that if I click outside the modal window, that is on the greyed out part, then the modal window exits and user is back where they were previously.  I am using Joomla 2.5.14.  Have tried OK with Firefox and IE.  Have added Pre-text instruction to advise people - see attachment.  I have disabled registration.
Hope this helps
Colin

Aug-30-13 19:01:28
Logout fails when usd whilst in Front End editor

Whoops,in above  the
    if ((strpos($testurl, '/') !== false))
should be
if ((strpos($testurl, '%') !== false)).

Colin

Aug-30-13 18:57:14
Logout fails when usd whilst in Front End editor

Hi
Two things - first same page logout if not guest
If logout is set to same page && we go to a page that is 'registered', what happens is that instead of returning to the home page on logout the user is taken to the standard Joomla login page with the message you must login first.  This confuses people as they have just logged out
I have seen the isMenuRegistered function and it does seem like it should work. However is is not getting called in the logout phase. I think this is because in getLoginRedirect the reference to  $this->params->get('jlogout')   [helper.php circa line 113] evaluates as false so  getLinkFromMenu is not called.  As a consequence the last part of getLoginRedirect is obeyed.  This in my case generates a redirect of

Code:

http://www.mysite.com/index.php/component/users/?view=login

with the result as above.

Second item - need for urldecode
This happens if a user is logged on, is using the front end editor and decides to logout without using Save or Cancel to first exit the editor.
In this situation getLoginRedirect obeys the code
if (JRequest::getString('return'))
            return JRequest::getString('return');
This comes back with a string containing %xx encodeded characters.so urldecode sorts it out.  Probably need to use something like
    if ((strpos($testurl, '/') !== false))
just in case the % should one day occur as the first character.

Hope this helps.

Colin

Aug-30-13 09:23:17
Logout fails when usd whilst in Front End editor

SCLogin is very good but I have found a situation where it has a challenge.  Only using Joomla login/logout no social ones involved.
Using the JCE Editor in Front end mode.  If a user logs out whilst the front end editor is open, that is the user exits without doing a Save or Cancel in the Editor, then it fails.  This is because the return url has hex encoding %xx characters such as

Code:

http%3A%2F%2Fwww.mywebsite.com%2Findex.php%2Flocal

instead of

Code:

http://www.mywebsite.com/index.php/local

There is a simple pragmatic fix shown below.

First I will describe my setup a little. Access to the front end editor and various other facilities only appear in the relevant menu when the person is logged in.  The login is set to  return to 'same page', but the logout is set to return to the home page.  This is because I could not fathom out how to resolve the problem when using logout return to same when the page will not exist for access when I have logged out - so I did a simple practical solution the get over my 'challenge'.  No doubt the profession coders will solve matters in a better way.

The simple fix, which could be implemented much, much better. Insert the following code as illustrated below into mod_sclogin.php around line 22.

Code:

$user = JFactory::getUser();

$jLoginUrl = $helper->getLoginRedirect('jlogin');
$jLogoutUrl = $helper->getLoginRedirect('jlogout');
//new code from here - need to 'undo' base64_encode
$camjLogoutUrl = base64_decode($jLogoutUrl);
// now do urldecode to replace any %xx character sequences with singe equivalent character, harmless if there  are none
$camjLogoutUrl2 = urldecode($camjLogoutUrl);
// uncomment line below if you want to see what is happening
//echo "logout1-$camjLogoutUrl-<br />logout2-$camjLogoutUrl2-<br />";
// now re encode in base64
$jLogoutUrl = base64_encode($camjLogoutUrl2);
// end of extra code
$registerType = $params->get('register_type');
$forgotLink = '';

Colin

Aug-12-13 05:45:15

Hi
If you want to have SCLogin called directly from a menu then get NoNumbers Modules Anywhere Plugin.  You create a menu item as type Text Separator and put {module SCLogin} in the title.  Obviously Modals Anywhere has to be published.  In my case I set the SCLogin module to appear in position footer but put the menu item in my top menu.

This gives me two places where login/logout appears

  • Index
  • » Users
  • » colinM
  • » Posts

Board Info

Board Stats
 
Total Topics:
11497
Total Polls:
0
Total Posts:
48401
Posts today:
6
User Info
 
Total Users:
47466
Newest User:
BetsyLopez2
Members Online:
1
Guests Online:
834

Online: 
PhC
Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program