Topic-icon Keep refreshing on Registration Page

Support Specialist
11 years 8 months ago #26157 by alzander
Did you clear your Joomla cache after you made the update? Beyond that, you may want to clear your browser cache, just to make sure. Those are the most important things to do after you update JFBConnect if you're going to test immediately. Otherwise, you can wait the 20minutes - a few hours for the caches to clear themselves.

As for the 'guest' issue, if you have the System - Cache plugin enabled, make sure that the Browser caching setting is disabled. That should *never* be enabled on sites that allow logging in (not just JFBConnect / Facebook logins). If you change that, again, clear your caches as above.

Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 8 months ago #26165 by alefel
Thanks for the quick reply. But that is not the issue. I updated it several days ago. Also, even after I updated, it keeps telling me to update:

JFBConnect - Must be updated manually Update Component 4.2.4 N/A Administrator www.sourcecoast.com/updates/jfbconnect.xml
www.sourcecoast.com/index.php?option=com_arsview=releaseid=18

That link, BTW, doesn't exist.
Anyway, could this be because I had made a manual change to the jfbcsystem.php? Maybe it didn't update because of that.

Also, the guest user is not for that reason. I had the cache plugin disabled. I enabled it now but with browser cache disabled.

Thanks,
Alex
The topic has been locked.
Support Specialist
11 years 8 months ago #26167 by alzander
We'll have to look into why the update link is incorrect, but that's not critical right now.

The problem you're having shouldn't be because you modified the jfbcsystem.php file unless you changed the permissions on it in a way that made it unwriteable. When you install/upgrade JFBConnect, all the files should be overridden as long as the permissions allow for that. That's simply how Joomla works for installing.

As for the guest user issue, I just clicked the Login with Facebook button on your site and was immediately logged in as expected. I didn't have to navigate to another page or do anything else. If you're still having the issue, can you try the following:
* Try from a different FB User
* Disable the CloudFare services for now. They can heavily cache content, and that could be where the caching is taking place. We'll need to narrow down if that's where the issue is.. I'm not saying you'll have to disable it permanently.

Let us know how testing goes. Again, from a quick test, we couldn't see the not-logged in issue you describe.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 8 months ago #26173 by alefel
Sure. The link issue is definitely not critical.

I returned the original jfbcsystem.php and updated again. I saw from the file date that it was updated. I tested again and I got the infinite refresh. So I went and manually changed this line again: $subs = "\nFB.Event.subscribe('auth.authResponseChange', function(response) {jfbc.login.on_login();});";
Now, I'm back to the last scenario I described: no infinite refresh but the login refreshes the page but shows the Log In button. Note this is a different button than the first time the page loads: Logar com Facebook, translated to Portuguese.
I have disabled CloudFlare but no luck. It's still disabled right now.

What browser are you using that is working? I'm trying Chrome, Firefox and IE8. All with the same result.

Thanks,
Alex
The topic has been locked.
Support Specialist
11 years 8 months ago #26174 by alzander
Let's keep everything as JFBConnect installs it. That's easier to diagnose instead of with changes. So, please, revert back.

I just tested logging in again and I'm seeing the Guest issue you mention. The issue is definitely because of browser caching being enabled. There is something that is setting an expires header of about 5 minutes in the future. Because of that, when the user logs in, but stays on the same page, the browser just shows the cached version, not the updated page with the login. You need to disable browser caching, wherever that's happening. It's either the System - Cache extension or one of many other optimization extensions that can do that.

I've still never seen the infinite refresh. However, since we have to set a cookie to prevent the auto-refreshing, if browser caching is enabled, that cookie will not be set and/or read. So, it all seems to be coming down to finding what is aggressively caching your pages and disabling it.

Hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 8 months ago #26175 by alefel
Alright! That's working now. The issue was indeed some kind of caching. I could not figure out where so I took out the hammer: set it on the .htaccess. Not very friendly from my part but that's working now. I'll try with Cloudflare but I don't believe that will be an issue since I have that only caching static objects.

The only minor thing now is that it keeps telling me to update the version even though I have the latest (by the way, the cookie workaround is also working. no manual changes anymore). Not worried about this one though.

Thanks a lot for the support!
Alex

PS: In case someone else has this issue in the future, this is what I put in my .htaccess:

# 1 MONTH
<filesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
Header set Cache-Control "max-age=2419200, public"
</filesMatch>

# 1 WEEK
<filesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>

# 24 HOURS
<filesMatch "\.(txt|xml|js|css)$">
Header set Cache-Control "max-age=86400"
</filesMatch>

# NEVER CACHE
<filesMatch "\.(html|htm|php|cgi|pl)$">
Header set Cache-Control "max-age=0, private, no-store, no-cache, must-revalidate"
</filesMatch>
The topic has been locked.
Support Specialist
11 years 8 months ago #26177 by alzander
For the update issue, I'm assuming you mean from the Joomla Update Manager? If so, try purging the cache. If that doesn't work, please start a new thread and we can look into it more. This thread is pretty lengthy, and that's getting off topic.

Regarding the refresh issue, glad you got it! Caching can be wonderul, but also a pain. Browser caching for HTML output (non-static) should never be browser cached on a site that allows logins.. for reasons you've just seen. Anyways, glad you got it going. If you need anything else, just let us know.. we'll be here.

Finally, if you haven't already, please consider leaving a rating and review on the Joomla Extension Directory for JFBConnect, or our support. It's certainly not required, but very appreciated:
extensions.joomla.org/extensions/social-...ook-integration/7215

Thanks, and good luck!
Alex
The topic has been locked.