Hey guys,
I just setup Bakery on a number of subdomains and now that I have gotten it running it works great! One major issue that I had noticed is that user registration and settings weren't being transferred to slave sites.
I was receiving the following errors:
Problems
# Error 0 php_network_getaddresses: getaddrinfo failed: Name or service not known for site at http://atrium.ole.org
# Error 0 php_network_getaddresses: getaddrinfo failed: Name or service not known for site at http://guide.ole.org
# Error 0 php_network_getaddresses: getaddrinfo failed: Name or service not known for site at http://network.ole.org
# Error 0 php_network_getaddresses: getaddrinfo failed: Name or service not known for site at http://library.ole.org
# Error 0 php_network_getaddresses: getaddrinfo failed: Name or service not known for site at http://qa.library.ole.org
Getaddrinfo was failing because it required that all the slave sites contain a trailing slash. This was something that I didn't include.
I was wondering if we could just add a quick check in the code to indicate a warning or error with websites that don't include a trailing slash?
Cheers
Shane
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | bakery--650468-6-d6.patch | 1.51 KB | juliangb |
| #6 | bakery--650468-6-d7.patch | 1.45 KB | juliangb |
| #3 | bakery--650468-3.patch | 1.13 KB | juliangb |
| #2 | bakery--650468-2.patch | 1.13 KB | juliangb |
| #1 | bakery--650468-1.patch | 808 bytes | juliangb |
Comments
Comment #1
juliangb commentedThis patch adds the slash for you if it isn't there already.
Comment #2
juliangb commentedIt is also necessary to have a trailing slash on the end of the url of the master site field on each slave. Otherwise, any update of user info won't find the account because it doesn't form the 'init' field correctly to check against.
Updated patch.
Comment #3
juliangb commentedMinor change to the patch - removes trailing whitespace from the empty lines.
Comment #4
juliangb commentedIt would be good to have an opinion of a maintainer for this.
The current situation is that if the trailing slash is left off either the master or slave entries in the settings, parts of functionality do not work. This hinders an already sensitive installation.
I would like to see a point where a site administrator has one less hurdle to think about, hence lowering the barriers to using the module.
This patch automatically adds the trailing slash as part of the submit handler for the admin settings form. An alternative would be to check for the trailing slash each time the url is used. I think this method is better as it means the check is only done once, rather than each time the values are used.
The current patch is for the D6 version (I'm guessing it won't apply to the D7 version as the line numbers won't correspond). I can redo it for the D7 version if needed. The actual code added should be the same.
Comment #5
gregglesThis looks good to me. It would be nice to change the documentation to be a bit nicer and also yes, re-roll for Drupal 7.
Comment #6
juliangb commentedAttached are updated patches for both D6 and D7.
For D7, there is an existing bug that prevents this from being tested properly - see #751090-17: Bakery for Drupal 7: testing and synch-repair system. However, none of the code added depends on version, so hopefully this can be committed and we can handle that bug as part of #751090: Bakery for Drupal 7: testing and synch-repair system.
Comment #7
coltranePatches in #6 tested on D6 slave and D7 master and work great.
Comment #8
gregglesNow committed to 7.x http://drupal.org/cvs?commit=361298 and 6.x http://drupal.org/cvs?commit=361300
Thanks, guys!
Comment #9
juliangb commentedMinor correction to title so we're clear about the change that was made.