I selected the Display Suite One Column layout for my Article node type. When i want to assign the Like Button field to the Content region i get the following error:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /en/system/ajax
StatusText: parsererror
Fatal error: Function name must be a string in /var/www/comac/public_html/modules/field_ui/field_ui.admin.inc on line 152

Other fields do work so i suspect the problem lies with fb_share.

Drupal 7.8
Display Suite 7.x-1.3
Facebook Social 7.x-2;0-beta2

Members fund testing for the Drupal project. Drupal Association Learn more


silkogelman’s picture

15.69 KB

Not sure if this is a related error or a separate issue:

I don't use the Display Suite module, and I use fb_social's latest dev release (2011-Oct-26)
When I go to admin/structure/types/manage/article/display
to rearrange the items it gives me

An AJAX HTTP error occurred.
HTTP Result Code: 500
Path: /system/ajax
StatusText: Internal Server Error

(complete error message is in the attached image)

ferdi’s picture

I couldnt reproduce this. Does it work for you on a clean install (fb_social + display suite)


cray146’s picture

Thanks for the swift response.

I just did a clean install (d7.9) and installed the latest supported versions of fb_social and ds (and the required ctools). I then defined the following Facebook Social Preset (export):

$fb_social_preset = new stdClass;
$fb_social_preset->disabled = FALSE; /* Edit this to true to make a default fb_social_preset disabled initially */
$fb_social_preset->api_version = 1;
$fb_social_preset->name = 'Facebook Like Button';
$fb_social_preset->description = 'Facebook Like Button';
$fb_social_preset->plugin_type = 'like';
$fb_social_preset->settings = array(
'node_types' => array(
'types' => array(
'article' => 'article',
'page' => 0,
'opengraph_tags' => 0,
'plugin_location' => array(
'location' => '1',
'display_teasers' => 0,
'block' => 0,
$fb_social_preset->fb_attrs = array(
'send' => 0,
'layout' => 'button_count',
'show_faces' => 0,
'width' => '350',
'action' => 'like',
'font' => 'verdana',
'colorscheme' => 'dark',

I still get an ajax error:

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /system/ajax
StatusText: Internal Server Error

In the apache error log I find:
[Sat Oct 29 15:49:47 2011] [error] [client] PHP Fatal error: Function name must be a string in /home/chris/public_html/drupal7/public/modules/field_ui/field_ui.admin.inc on line 152, referer: http://drupal7/admin/structure/types/manage/article/display

heyyo’s picture

Strange this error is not happenning in /admin/structure/block just with layout of Display Suite.
But in my case I have no problem to add Like Block with Display Suite, I have this bug only with FB Comments !

roninsa’s picture

That looks like the error I'm getting when using Display Suite in manage display mode.

When I attempt to change the status of fb like to enable get this error.

I forgot to add that I've tried using both the beta and the dev versions and experience the same problem.

ferdi’s picture

Can you please give it a try with the -dev version of the module ?

roninsa’s picture

Hi ferdi,

I just tried the latest dev version and am seeing the same error as before.

Any attempt to move the like button option in display suite still causes the ajax error message
as described earlier.

Here is what I see in my apache error file:
[Wed Dec 07 01:28:54 2011] [error] [client] PHP Fatal error: Function name must be a string in /var/www/ncry-7.0/modules/field_ui/field_ui.admin.inc on line 152, referer: http://myexample.org/admin/structure/types/manage/youtube/display/teaser...

Plain vanilla pages seem to display the like button as expected. But any page created with Page Manager
doesn't display the like button. The only way to display a like button on a Page Manager created page is to set the like button to be a block.

Here are the modules I'm currently using: Display suite 7.x-1.x-dev (2011-Dec-06), Panels 7.x-3.0-alpha3,
Views 7.x-3.x-dev (2011-Dec-01)

Sorry, I don't have more to give you, but I hope this helps.

kiranjyoth’s picture

Hello ferdi,

I have the same issue mentioned above. When i try to assign the regions using display suite, I get an ajax error.

Version : Drupal 7.10
Module : fb_social 7.x-2.0-beta3
Theme: Omega 3

Any suggestions?


ferdi’s picture

Can someone describe how to reproduce this. I cant reproduce it with Display suite alone. I havent tried it in combination with Panels though. Does it happens only when Panels is involved ?


killtheliterate’s picture

I've been able to reproduce this error exactly with a completely clean install of 7.x-2.0-beta3.

I'm not using Display Suite at all.

I encountered this while trying to move the Facebook plugin field at admin/structure/types/manage/%/display. My intention in doing so was to use Facebook Comments plugin for the commenting system on a blog content type. I can work around this by moving the plugin to a block that only displays on the content type I'm using for a blog, though it will require a few other manipulations.

roninsa’s picture

Yes. Panels is involved too. Sorry, I didn't mention that before.

Drupal 7.10
Display Suite 7.x-1.x-dev
Panels 7.x-3.0-alpha3

Oh and it's not just panels or Display Suite. I'm have a similar problem with
Media: YouTube 7.x-1.x-dev youtube

Thanks for the response. I hope this helps.

michaelfillier’s picture

I was having the same issue. It seems that the problem is the preset name should only have letters, underscores and numbers. The for does not check for these values when you submit, I only found this out when I exported my preset and re-imported it. On the import form you cannot submit the preset if your preset name is not properly formatted.

I have attached the screen shots for reference of the steps and the response.

mmncs’s picture

When I add the following facebook like box code to my html template in Omega, all AJAX calls returns an error:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=254329271567761";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
ferdi’s picture

#13. You should not add that code to your template file. That's what this module does for you.

ferdi’s picture

@ michaelfillier I think you have found the source of this bug. That textbox comes from ctools though and I'm not sure whats the best way to proceed. Maybe document the issue so people dont use spaces in the preset name ?


PapaGrande’s picture

Thanks, ferdi, for figuring this out. Basically, the Name field should be treated like a machine name--all lowercase, no spaces or special characters--and the description field is the human name. At a minimum, better help text should be added. Ideally, the labels are changed and validation is added to the preset form, but I don't have time to create a patch right now.

By the way, I'm not using Display Suite at all, but I do get the AJAX error on the Managing Display page of a content type.