I read the README.txt from start to finish

Updating the settings.php with the code mentioned in the readme.txt file of drupal for facebook, makes the upload feature of imce not work.

Bellow is the code which I added to the bottom of the settings.php

/**
* Drupal for Facebook settings.
*/

if (!is_array($conf))
$conf = array();

$conf['fb_verbose'] = TRUE; // debug output
//$conf['fb_verbose'] = 'extreme'; // for verbosity fetishists.

// More efficient connect session discovery.
// Required if supporting one connect app and different canvas apps.
//$conf['fb_apikey'] = '123.....XYZ'; // Your connect app's apikey goes here.

// Enable URL rewriting (for canvas page apps).
include "sites/all/modules/fb/fb_url_rewrite.inc";
include "sites/all/modules/fb/fb_settings.inc";

// end of settings.php

further removing the code gets the imce working properly again immediately.

CommentFileSizeAuthor
#9 fb_js_settings.diff862 bytesDave Cohen

Comments

jghyde’s picture

Try 1:

Remove these lines:

<?php
if (!is_array($conf))
$conf = array();
?>

Try 2:

Change the above to:

<?php
if (!is_array($conf)) {
  $conf = array();
}
?>
kirtimansharma’s picture

Nope !
Tried both the options.
With the first one I got errors message and with the second option - imce upload feature still not working.

Dave Cohen’s picture

Use firebug or something like that to track down errors in javascript.

dtecson’s picture

The issue isn't with the update.php settings...

I did a bad thing to fix this, but it works for now. The issue is happening here
if (typeof(FB) == 'undefined') {
// Include facebook's javascript. @TODO - determine locale dynamically.
//jQuery.getScript(Drupal.settings.fb.js_sdk_url);
jQuery.getScript('http://connect.facebook.net/en_US/all.js');
}

So just I connected directly to the needed js file for now.

Dave Cohen’s picture

You should instead figure out where FB is being defined. Probably by some other facebook module like fb_social or fb_connect.

Marko B’s picture

I removed

include "sites/all/modules/fb/fb_url_rewrite.inc";
include "sites/all/modules/fb/fb_settings.inc";

from settings.php but imce still didnt work, only when i removed facebook api IMCE started to work again. Seems that FB just breaks IMCE somehow :-(

Marko B’s picture

Confirming that above solutions helps and makes IMCE work again.

Marko B’s picture

Here is i would guess even "better" solution

http://drupal.org/node/990140#comment-3791926

should be implemented in next release.

Dave Cohen’s picture

Status: Active » Needs review
StatusFileSize
new862 bytes

Does this patch solve the problem?

Dave Cohen’s picture

Version: 6.x-3.0-rc1 » 6.x-3.x-dev
Status: Needs review » Fixed

I didn't get a review, but I did check in the patch. Please re-open if not fixed in next release candidate.

nancydru’s picture

Now that I've seen the problem and made sure I could reproduce it, I can confirm that the -dev version fixes it.

You might want to add something to the project page.

Status: Fixed » Closed (fixed)
Issue tags: -imce

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