Problem/Motivation

Here are the steps to reproduce:
1. You have to open a site on the master example.com, for example example.com/node/1
2. Open a node for editing on a the subsite test.example.com/node/100/edit and edit some node data, for example in a new tab or browser window.
3. Now go back to the browser tab with the master site example.com, leave the subsite tab open and navigate on the master site to another node, for example example.com/node/2
4. Go back to the subsite browser tab and try to save the node.

The form submit will fail and the page is reloaded without saving the edited node data. This also works if you try to save other forms.

I can reproduce this bug on a blank Drupal 6.22 installation with Bakery 6.x-2.x-dev (Debian Lenny, PHP fcgid).

Proposed resolution

N/A

Remaining tasks

Please test on your system and confirm the bug or help building a patch for this bug.

User interface changes

N/A

API changes

N/A

Related Issues

N/A

Comments

crifi’s picture

Title: Saving a node on subsite fails if user parallel navigates on master side » Saving a node on subsite fails if user parallel navigates on master site

Fix typo.

coltrane’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

What is the error message? I suspect this is not a Bakery problem because there is little-to-no Bakery involvement during node edit.

greggles’s picture

We've seen this symptom on g.d.o. I think this is probably related to rebaking one (or more) of the cookies (probably unnecessarily) causing your session to get disassociated from the form cache.

greggles’s picture

And, posting that comment was an attempt to get it to trigger on g.d.o and I was unable to reproduce the behavior. My steps were:

1. Open node for editing on g.d.o
2. Visit d.o, click a few pages, post that comment
3. Go back to g.d.o and save the node

I expected the node to present back to me without the change. In fact the change was saved as a new revision.

crifi’s picture

Thank you greggles. I don't have an error message or watchdog entry. The issue also concerns comment forms on my sites.

crifi’s picture

Issue summary: View changes

Fixed some typos

larowlan’s picture

Version: 6.x-2.x-dev » 7.x-2.0-alpha4
Issue summary: View changes

I'm seeing this on 7.x

larowlan’s picture

Steps to reproduce.

Login to master site.
Visit slave site and fetch a form as logged in user (any form) in new tab/window.
Click around on master site.
Attempt to save form on child site - silently drops form values.

larowlan’s picture

Removing r4032login fixed this...

larowlan’s picture

...or maybe not

larowlan’s picture

More debugging.

Login on master site.

Visit child-site, see bakery_user_authenticate_finalize() fire, user logged in.

Visit parent-site, see global $user->uid == 0 in bakery_boot().
bakery_user_authenticate_finalize() fires on master site, triggering drupal_session_regenerate().
302 redirect issued to page via drupal_goto.

Visit child-site, global $user->uid == 0 in bakery_boot().
bakery_user_authenticate_finalize() fires on child site, triggering drupal_session_regenerate().

Constant 'Session opened for %name.' entries in watchdog, from bakery_user_authenticate_finalize().

larowlan’s picture

Status: Postponed (maintainer needs more info) » Active
larowlan’s picture

Status: Active » Fixed

Ok, the issue here is that our server was configured for settings.php inheritance.
So $cookie_domain was identical for the master site (example.com) and the slave site (example.com/subsite).
So we were only getting one session name/session cookie.
Removing $cookie_domain and instead setting $base_url for each site to ensure unique session names meant it worked.
Thanks for an awesome module, quite an education debugging it.

greggles’s picture

Component: Code » Documentation
Category: Bug report » Task
Status: Fixed » Active

There's documentation about how to set cookie_domain and base_url in settings.php to work with this module. Seems like a great idea to add your findings there.

Any chance for a patch to update that documentation?

melandren’s picture

A more step by step walk through of how to fix this would be greatly appreciated.

purencool’s picture

Status: Active » Closed (outdated)