This is a conversation which was previously logged in place of this function reference.
(3:30:36 PM) omry: it appears that get_site_option() returns an incorrect an empty value if called from wpmu_new_blog when user registers a user and a blog at the same time (3:30:54 PM) omry: when wpmu_get_site_option is called while the blog and user are created together, $wpdb->siteid is not initialized, so wpmu_get_site_option returns incorrect value. (3:31:01 PM) ***MartinCleaver reads http://koala.ilog.fr/twikiirc/bin/irclogger_log/wpmu?date=2007-11-06,Tue (3:31:14 PM) omry: this may be by design for some reason, but I think it's a bug. site_options should be available at any stage (3:31:23 PM) omry: I also saw this somewhere: $wpdb->siteid = $current_blog->site_id; , this is a bit strange, as far as I understand, siteid is always 1, so why wait for a blog to exist before assigning 1 there? I was not able to find where $current_blog->site_id is initialized. (3:31:38 PM) MartinCleaver: wouldn't surprise me if there are bugs. donncha_ works really hard to keep all the edges maintained. (3:32:05 PM) MartinCleaver: I don't think there's a test harness so who knows? (3:32:10 PM) omry: MartinCleaver, I think it is a bug. but I want to be sure donncha_ agrees with me before I hack something. (3:32:40 PM) omry: I can set $wpdb->siteid to 1 before I call get_site_option (3:33:00 PM) omry: but I want to be sure this does not violate some unknown truth. (3:33:13 PM) MartinCleaver: I don't recall the specifics of that stuff (3:33:32 PM) omry: you agree that the siteid is always 1? (3:33:54 PM) omry: this stuff breaks my plugin commander. (3:34:02 PM) MartinCleaver: it's not documented, as far as I know (3:34:19 PM) omry: hence, I want donncha_ to comment on this. (3:35:00 PM) MartinCleaver: everyone wants donncha's time (3:35:18 PM) MartinCleaver: the bottleneck must cause such a pressure (3:35:30 PM) donncha_: yeah, and I'm knackered tired after a long day :) (3:36:13 PM) donncha_: omry: siteid can be > 1 if there are more than 1 sites hosted on your install (3:36:28 PM) ***MartinCleaver s on the phone (3:36:31 PM) donncha_: since people are abusing the wp_site table to do domain mapping that's possible .. (3:38:24 PM) MartinCleaver: abusing? (3:38:33 PM) MartinCleaver: or using? (3:38:40 PM) MartinCleaver: or abusing? (3:39:10 PM) donncha_: abusing .. why not just use entries in wp_blogs? if that doesn't work, figure out why not and send me a patch :) (3:40:20 PM) donncha_: afk again .. needed elsewhere .. (3:42:26 PM) omry: hi donncha_. (3:42:30 PM) omry: can you please read my question above? is this a bug? (3:42:38 PM) MartinCleaver: " (3:36:13 PM) donncha_: omry: siteid can be > 1 if there are more than 1 sites hosted on your install" (3:42:54 PM) omry: donncha_, what's possible? that it's a bug? (3:43:04 PM) omry: donncha_, the problem I am solving is automatic activation of plugins for new blogs (3:43:07 PM) TelnetManta__ left the room (quit: "Ex-Chat"). (3:43:10 PM) omry: I need a place to store the list of plugins to auto-activate that is not specific to any blog (3:43:14 PM) omry: I used the site_options. (3:43:16 PM) omry: how is that abuse>? (3:43:26 PM) omry: donncha_, alright.. ttyl. (3:43:40 PM) omry: MartinCleaver, this does not really answer the first question: is this a bug? (3:44:42 PM) donncha_: bah (says he with the laundry) .. you're not abusing :) I'd have to look over that code again to give you an answer and I'm too tired right now, sorry. (really afk now) (3:45:10 PM) omry: donncha_, do you want me to open a ticket? (3:45:16 PM) omry: or just nag some other time? (3:47:02 PM) omry: there is some inconsistency for sure: if I call get_site_option() for an existing user (when he registers a new blog) all works. if I call it when the user registers a user and a blog (from wpmu_new_blog, for a new user) I does not work.