Content Taxonomy Autocomplete displays raw code to user when terms not in the vocabulary are entered. This was fixed in the 6.x branch: http://drupal.org/node/372560

How can this be fixed in 5.x?

Comments

plan9’s picture

JS calendar is also broken when facebook Connect is enabled. I'm pretty sure it's the same bug at play.

plan9’s picture

The fix for 6.x supplied by ryanjames here: http://drupal.org/node/372560#comment-1270428 was to change the local js file reference to a remote facebook one: http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php

I have tried but failed consistently to get this working in 5.x. Obviously it's the '/js/FeatureLoader.js' that needs to be changed to reference the link... but how?

function _fbconnect_render_js() {
  global $base_url;
  global $user;
  $url = drupal_to_js($base_url);
  drupal_add_js(drupal_get_path('module', 'fbconnect') .'/js/FeatureLoader.js', 'module', 'footer');
  drupal_add_js(drupal_get_path('module', 'fbconnect') .'/js/fbconnect.js', 'module', 'footer');

  if (!$conf = fbconnect_get_config()) {
    return;
  }

If anyone with coding experince knows how to do this I would be REALLY grateful to hear from you!

P9

yossilac’s picture

I gave the wrong solution here, please disregard (and move to the next comment).

yossilac’s picture

Sorry, disregard my previous comment.

What you should do is remove

drupal_add_js(drupal_get_path('module', 'fbconnect') .'/js/FeatureLoader.js', 'module', 'footer');

and change fbconnect_footer to -

function fbconnect_footer() {
  $fb_js_url = 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php';
  $footer = '<script type="text/javascript" src="'. $fb_js_url .'"></script>';

  // Display the autoconnect form.
  if (!fbconnect_get_fbuid()) {
    $footer .= drupal_get_form('fbconnect_autoconnect_form');
  }
  return $footer;
}

This is essentially the same as the drupal 6 version change.

(Hope I got it right this time...)

plan9’s picture

Hi yossilac

Thanks very much for this. Unfortunately it didn't work for me - it came up with some kind of 'wrong syntax' error.

In the end I found that by copying and pasting the code from here: http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php
directly into the js file here: modules/fbconnect/js/FeatureLoader.js solved the problem.

plan9’s picture

Actually my 'fix' caused another problem - the inability to log out!!

I'm trying your solution again yossilac - the error I get is this:

Parse error: syntax error, unexpected T_VARIABLE in /var/www/vhosts/site/httpdocs/sites/all/modules/fbconnect/fbconnect.module on line 747

Line 747 is:

$fb_js_url = 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php';

any ideas?

Thanks for your help

:)

plan9’s picture

As a workaround to this bug I'm trying to disable the auto complete behaviour. I have disabled Content Taxonomy Autocomplete but the auto complete action persists!

Anyone know how can I disable this?

jusyjim’s picture

subscribing

budda’s picture

@plan9 Check the code above line 747. or paste the whole function in a reply.

vectoroc’s picture

Status: Active » Closed (fixed)
akaserer’s picture

Status: Closed (fixed) » Active

does one of this solutions work??

akaserer’s picture

just an update: i did the fix from #5 and it seems to work ( without making to many tests).

plan9’s picture

Yes I'm pretty sure I got #5 to work in the end.

@akaserer: are you now able to post comments through to facebook users walls? I used to be able to - but now I get error messages from facebook. I just wondered if this is down to the current facebook API changes or something I've done.

akaserer’s picture

@plan9 : are you now able to post comments through to facebook users walls?

i dont use this feature, so i cant tell.

but the autocomplete feature works fine

vectoroc’s picture

Priority: Critical » Major
plan9’s picture

I've had to drop FBconnect as I'm using Boost and Persistent Login modules - it's just becoming to complex to troubleshoot login issues with all three modules battling it out.

gobinathm’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing the issue. It was inactive for a long time & it's related to a Drupal Version which is not supported anymore