Drupal is designed to be entered from a file in the site’s root directory, via index.php or cron.php or xmlrpc.php, etc. But since chatroomread.php is called directly and it‘s in chatroom directory, $base_url is getting set relative to the chatroomread.php file when it should be relative to the root of the Drupal install.

In order to get chatroom to work with the way $base_url is calculated, we’ll need to set that variable before conf_init() is called. This patch should fix things.

Comments

darren oh’s picture

Status: Active » Closed (works as designed)

Drupal unsets globals during start-up. This problem cannot be fixed with a patch to the module.

johnalbin’s picture

Version: 5.x-1.7 » 5.x-1.x-dev
Status: Closed (works as designed) » Needs review
StatusFileSize
new3.47 KB

never say never.

darren oh’s picture

Status: Needs review » Closed (works as designed)

Still won't work. See http://api.drupal.org/api/5/function/drupal_bootstrap:

Each phase adds to the previous one, so invoking a later phase automatically runs the earlier phases too.

johnalbin’s picture

Status: Closed (works as designed) » Needs review

$phases is static. So when you array_shift the $current_phase off the $phases stack, that phase is never run again.

darren oh’s picture

Status: Needs review » Closed (won't fix)

This is a general Drupal bug. The fix is in issue 159854.

keesje’s picture

johnalbin’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new4.14 KB

Kees’s workaround fixes the issue because setting $cookie_domain means that Drupal’s call to session_name() will use $cookie_domain instead of $base_url. It’s a good fix, but would require special install instructions for chatroom.

I’ve tested the following patch and it fixes the issue without requiring the admin to set $cookie_domain.

francoud’s picture

I also tried this patch. It works good with I.E. (6). Doesnt work - for me, at least - with Firefox... The $cookie_domain workarounds works for both.

darren oh’s picture

Status: Needs review » Fixed

Accepted this patch (CVS commit 81934, since the core maintainers won't accept a fix.

Anonymous’s picture

Status: Fixed » Closed (fixed)
darren oh’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new934 bytes

Committed the wrong patch. Updated patch attached.

darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 84030.

Anonymous’s picture

Status: Fixed » Closed (fixed)
toceguera’s picture

Version: 5.x-1.8 » 5.x-1.x-dev

Please Excuse my ignorance on this procedure. But how exactly am I supposed to use this patch. Do I copy and paste somewhere? Do I make a new file with it? TIA

//// Please disreagrd this comment as I figured it out and I already have the patched version ///

darren oh’s picture

Version: 5.x-1.x-dev » 5.x-1.8

This patch has already been applied in the latest release.