Hi,

please add boost support. Boost sets cookie everytime an user login, to ensure non-cached pages are serving to the user.

I solved it by adding these lines to function fboauth_login_user().

if (module_exists('boost')) {
  boost_set_cookie($account->uid);
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

timofey’s picture

Category: feature » bug

The above does not work for me.

Here's what's happening:
When boost is enabled, if the person logs in through fbconnect, and they are already logged into facebook, they are taken straight back to the front page, as if nothing happened, and unless they refresh the page, they are served cached pages.

If the person is not logged into facebook, when they return to the front page, it works fine and doesn't serve cached pages.

Please help! How do prevent the fbconnect logged in user from seeing cached pages?

timofey’s picture

To correct the issue, it's not only having difficulty with boost but this happens when drupal's "Cache pages for anonymous users" is enabled.

...so the question continues, how do you let drupal know that the person is logged in, after they sign in through fbconnect??

quicksketch’s picture

I don't use Boost on any of my sites, so I probably won't investigate this issue myself.

ifeelgood’s picture

The above code works, but you need to list "fboauth/*" to boost exception list.

quicksketch’s picture

Category: bug » feature

This is a feature request, not a bug.

Alauddin’s picture

Title: Add boost integration » Add boost integration - fbOAuth - needs 2 clicks to login due to caching - Solved
Status: Active » Fixed

This code from the issue creator along with #4 works like a charm.

Here are detailed instructions if your fbOAuth login takes place after couple of clicks and or page refreshes.

1) add the code as mentioned above to fboauth/includes/fboauth.fboauth.inc file

so the login function looks like this (added the if module boost exists)

function fboauth_login_user($account) {
  global $user;

	if (module_exists('boost')) {
 	 boost_set_cookie($account->uid);
	}

  if ($account->status) {
    $form_state['uid'] = $account->uid;
    user_login_submit(array(), $form_state);
  }
  else {
    drupal_set_message(t('The username %name has not been activated or is blocked.', array('%name' => $account->name)), 'error');
  }

  return !empty($user->uid);
}

2) Now visit boost config page
/admin/config/system/boost
and add the "fboauth/*" as exception.

BOOST CACHEABILITY SETTINGS
Cache specific pages
(default checked) All pages except those listed

fboauth/*

3) Clear cache - /admin/config/development/performance

Enjoy!

It would be great if module creator added this functionality as a lot of sites use boost.

imoreno’s picture

+1 for testing and integrate this one, boost is very popular and useful, and D7 might be very slow and resource consuming with large sites.
This could be a great help for large sites with a lot of anonymous users.
Please consider it,

BR
Itzhak

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

irishdan’s picture

agreed. would love to see this in the next release. If we create a patch and test, is it possible to get it commited to the next release?

vflirt’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

Hi

I am reopening this issue as this is not fixed in anyway in the code.

grn’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Status: Active » Needs review
Issue tags: +boost
FileSize
462 bytes

Patch created by following the guidelines here: https://www.drupal.org/node/707484.

Enjoy.

BR GrN.dk

DarrellDuane’s picture

If someone who uses boost can validate that this works, I'll be happy to commit it.

grn’s picture

Well, I am using boost on multiple sites where it works great. Examples: HelePlanter.dk and IdeaHunters.dk.

But I am the on who submitted the patch, so maybe you will need approval from someone else.

BR. GrN.dk

glynster’s picture

Yes works like a charm, please commit as well!
I just upgraded to the new release and realized this was not included.

DarrellDuane’s picture

ok!

DarrellDuane’s picture

Status: Needs review » Patch (to be ported)

Ok, this has been added to the latest development version. Sorry I didn't add the right commit message this time.