bakery_init is too late as menu_set_custom_theme will run a menu_get_item cache the item and only later will bakery log you in. Bummer. This needs to be moved to hook_custom_theme

Comments

coltrane’s picture

What's the solution here?

greggles’s picture

The 7.x-1.x version of Bakery is based on the 6.x-1.x code where we didn't have a proper solution for page caching.

In 6.x-2.x we now use hook_boot and it works fine with page caching, but that code has not been ported to a corresponding 7.x branch.

Know anyone interested in working on that? ;)

greggles’s picture

Title: bakery fires too late » Port bakery 6.x-2.x to 7.x-2.x

Re-titling.

Also, as we have discussed in real life with Coltrane and Mebak there is likely not much point in trying to port each individual patch any more though we had been marking them that way. We should just do a new port of the 6.x-2.x code to 7.x.

seth.vincent’s picture

I've been working on porting 6.x-2.x to 7.x. It doesn't work yet.

I mostly have just ran the module through coder review/upgrade and been reviewing the changes on http://drupal.org/node/224333.

Currently I've got a version at http://github.com/sethvincent/bakery.

The module will enable, and the settings form will save changes.

Log in fails at example.com/bakery/login with a PDO exception error. I'm still working on changing all the db query stuff to the new database api syntax.

If you want the changes I've done so far in a patch I can upload that later this evening or tomorrow.

I'm still learning module development so please let me know if I've done anything wonky.

greggles’s picture

Sounds great to me, Seth.

Thanks!

I plan to go through the queue and mark all of the to be ported issues as duplicates of this if nobody objects in the next week or so.

chx’s picture

seth, now everyone can have a sandbox project on Drupal.org git repos, care to bring your code in-house? :)

jeremy’s picture

Subscribe

coltrane’s picture

There is a 7.x-1.x branch but the issue title is for 7.x-2.x. Just confirming that 6.x-2.x will be ported to 7.x-2.x. I think it's important to maintain the 2.x branch here because of the fact that Drupal6 and Drupal7 versions (with both as 1.x or 2.x) are compatible.

seth.vincent’s picture

Category: bug » feature
StatusFileSize
new46.07 KB

@chx: thanks, I've been meaning to start moving projects into sandbox repos here. encouragement helps.

I meant to post a patch for this earlier but overextended myself this week.

Also: some of the db syntax changes got confusing and it'll take me a little extra time to learn how all of that works.

I've attached the patch that coder spits out as a starting point.

sirkitree’s picture

sub

coltrane’s picture

Assigned: Unassigned » coltrane

I am working on this.

coltrane’s picture

Status: Active » Needs review
StatusFileSize
new43.19 KB

Path via git diff is against master branch.

SSO starting from master and slave are both working. My test environment was D6 master and D7 slave on Apache.

Attribute exchange of profile data will not work because of Field API use.

We need a generic attribute exchange system since D7 won't work with profile field sync of Bakery.

I propose that data exchange beyond core user properties (username, email, status) be stripped from Bakery, including cookies stroopwafel and gingerbread and that we create a separate module. Bakery can just invoke hooks.

Should this be Bakery 3.x?

dominict’s picture

I think the generic approach beyond mail, name, init makes a lot of sense. I have a custom version of Bakery I have been using on a dev site where I have had to do something like that in order to incorporate user locations with location module. I can't see any better solution especially for enabling 6.x / 7.x cross integration, but it will need good documentation.

coltrane’s picture

StatusFileSize
new43.47 KB

Updated patch with fixes for methods http_build_query, http_request, Bakery's pull account from master, and removing profile handling.

coltrane’s picture

StatusFileSize
new43.47 KB

Correcting set header

coltrane’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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