I am getting the following error message whenever I try to move a field into the hidden section.

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /system/ajax
StatusText: OK
ResponseText:
Fatal error: Function name must be a string in /home/content/75/7032375/html/modules/field_ui/field_ui.admin.inc on line 143

does anybody know how to fix this? greatly appreciated!

CommentFileSizeAuthor
#22 log.txt1.23 KBAnonymous (not verified)
#11 field_ui_fatal-debug-1075482-11.patch771 bytesyched

Comments

bfroehle’s picture

Priority: Critical » Normal

Are you using any contributed modules which provide additional field types?

Can you provide the steps needed to reproduce this?

htalwala’s picture

I am using the Links module and the Scheduler module. I think this error started happening after I installed the Field Permissions module, but I removed it, and I am still getting this error.

This error happens when I create a new field for a content type, and then go to the field display section and try to move that new field into the hidden section.

andrebonfanti’s picture

I am getting the same error too, but it happens when I try to click the field gear icon in the "manage display" form of my custom content type. I'm trying to configure an image field to be a "thumbnail" in teaser display, while the default is "original". The error is the same:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /?q=system/ajax
StatusText: OK
ResponseText:
Fatal error: Function name must be a string in /home/(my domain)/public_html/modules/field_ui/field_ui.admin.inc on line 143

The error happens even if I try to drag field to hidden section, as for htalwala.
My content type has only the default "body" field and an "image" field.
I have installed other modules which provide fields ("term reference", "node reference"), but the error was there before. I changed the admin theme from Seven to Bartik but the error remains.

In my logs I find these two errors:

Error 1:

Location http://(my domain)/?q=system/ajax
Message Notice: Undefined index: #value in field_ui_table_pre_render() (line 134 of /home/(my domain)/public_html/modules/field_ui/field_ui.admin.inc)

Error 2:

Location http://(my domain)/?q=system/ajax
Message Notice: Undefined index: #region_callback in field_ui_table_pre_render() (line 142 of /home/(my domain)/public_html/modules/field_ui/field_ui.admin.inc)

Thank you for any suggestion.

yched’s picture

subscribe for now

andrebonfanti’s picture

update: my error has gone for the moment in the content type "manage display" page.

I do not remember the steps I took. I managed to move fields by toggling the "show/hide row weight" option at the top and moving by editing weights (the toggle hides the drag-n-drop handles, so I think the page disable ajax, but I'm not sure).

I disabled the Dhtml menu module, too, which I used to avoid page reload. I'm not sure this caused the issue because a similar error appears when I try to fill the autocomplete field of the state/province Location module.
(UPDATE: the error does not show any more in autocomplete Location module)

I'll let you know if I remember other steps I took.

jibberish’s picture

Subscribe.

I'm getting the same error.

I try to change a content type and manage the display and I get this:

Error:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /drupal7/system/ajax
StatusText: OK
ResponseText:
Fatal error: Function name must be a string in c:\wamp\www\drupal7\modules\field_ui\field_ui.admin.inc on line 143

I'm really not sure what I've changed, but everything had been working perfectly for some time.

Cheers

Jibb

htalwala’s picture

It seems to be the fields permissions module itself that is creating the error. If you install it, you will no longer be able to hide fields using the original fields interface, you will have to do it through the field permissions module. Even if you uninstall the module, you will still get the error.

adriansky’s picture

I solved disabling the modele: Drupal for Firebug.

gerhardbaumeister’s picture

subscribe

jibberish’s picture

There seem to be lots of references to this problem, but I can't find a solution anywhere.

yched’s picture

StatusFileSize
new771 bytes

I have no clue what might happen here. It is probabaly caused by malformed "rows" in the form array describing the "Manage display" table. Off hand, I don't see how this could be related to the field_permissions module.

The attached debug patch should provide additional info to help us have a clearer notion about which module is at fault. To anyone facing the bug : please apply the patch and post the debug info here (might be reasonably large, please post in an attached .txt file).

Note : the patch will "hide" the bug but won't fix it. I don't recommend saving actual changes to your "Manage fields" forms with the patch applied.

jibberish’s picture

Hi yched

First off - thanks very much for the reply.

I'm running on WAMP and don't have access to Linux / UNIX at the moment. You wouldn't happen to have a pre-patched version of the file you could share for Windows would you? I know what CYGWIN is, but I've never used it.

Also - how do you invoke the debug mode?

Thanks in advance.

Cheers

Jibb

yched’s picture

@jibberish: you can easily apply the patch manually. Edit the modules/field_ui/field_ui.admin.inc file, and within the field_ui_table_pre_render() function, delete the lines marked with a '-', add the lines marked with '+'.

jibberish’s picture

@yched: I can manipulate image settings again now! Where do I find the log files? Is this in reports > Recent log messages

jibberish’s picture

@yched: I'm going to assume that this is the location of the logs and there are 3 logs written each time I try to update an image:

Log 1

TYPE	php
DATE	Friday, April 8, 2011 - 01:07
USER	TTadmin
LOCATION	http://localhost/drupal7/system/ajax
REFERRER	http://localhost/drupal7/admin/structure/types/manage/page-with-pic/display?render=overlay
MESSAGE	Notice: Undefined index: parent_wrapper in field_ui_table_pre_render() (line 134 of C:\wamp\www\drupal7\modules\field_ui\field_ui.admin.inc).
SEVERITY	notice
HOSTNAME	127.0.0.1
OPERATIONS	

Log 2

TYPE	php
DATE	Friday, April 8, 2011 - 01:07
USER	TTadmin
LOCATION	http://localhost/drupal7/system/ajax
REFERRER	http://localhost/drupal7/admin/structure/types/manage/page-with-pic/display?render=overlay
MESSAGE	User notice: Invalid row : captcha:
array (
  '#type' => 'fieldset',
  '#title' => 'CAPTCHA: no challenge enabled',
  '#collapsible' => true,
  '#collapsed' => true,
  'add_captcha' => 
  array (
    '#markup' => '<a href="/drupal7/admin/config/people/captcha/captcha/captcha_point/field_ui_display_overview_form?destination=system/ajax">Place a CAPTCHA here for untrusted users.</a>',
    '#tree' => true,
    '#parents' => 
    array (
      0 => 'fields',
      1 => 'captcha',
      2 => 'add_captcha',
    ),
    '#array_parents' => 
    array (
      0 => 'fields',
      1 => 'captcha',
      2 => 'add_captcha',
    ),
    '#weight' => 0,
    '#processed' => false,
    '#required' => false,
    '#attributes' => 
    array (
    ),
    '#title_display' => 'before',
    '#id' => 'edit-fields-captcha-add-captcha',
    '#sorted' => true,
  ),
  '#value' => NULL,
  '#process' => 
  array (
    0 => 'form_process_fieldset',
    1 => 'ajax_process_form',
  ),
  '#pre_render' => 
  array (
    0 => 'form_pre_render_fieldset',
  ),
  '#theme_wrappers' => 
  array (
    0 => 'fieldset',
  ),
  '#defaults_loaded' => true,
  '#tree' => true,
  '#parents' => 
  array (
    0 => 'fields',
    1 => 'captcha',
  ),
  '#array_parents' => 
  array (
    0 => 'fields',
    1 => 'captcha',
  ),
  '#weight' => 0.002,
  '#processed' => true,
  '#required' => false,
  '#attributes' => 
  array (
    'class' => 
    array (
      0 => 'collapsible',
      1 => 'collapsed',
    ),
  ),
  '#title_display' => 'before',
  '#id' => 'edit-fields-captcha',
  '#groups' => 
  array (
    'fields][captcha' => 
    array (
      '#group_exists' => true,
    ),
    'modes' => 
    array (
      '#group_exists' => true,
    ),
  ),
  '#attached' => 
  array (
    'library' => 
    array (
      0 => 
      array (
        0 => 'system',
        1 => 'drupal.form',
      ),
      1 => 
      array (
        0 => 'system',
        1 => 'drupal.collapse',
      ),
    ),
  ),
  '#ajax_processed' => false,
  '#sorted' => true,
)
in field_ui_table_pre_render() (line 145 of C:\wamp\www\drupal7\modules\field_ui\field_ui.admin.inc).
SEVERITY	notice
HOSTNAME	127.0.0.1
OPERATIONS	

Log 3

TYPE	php
DATE	Friday, April 8, 2011 - 01:07
USER	TTadmin
LOCATION	http://localhost/drupal7/system/ajax
REFERRER	http://localhost/drupal7/admin/structure/types/manage/page-with-pic/display?render=overlay
MESSAGE	Notice: Undefined index: weight in field_ui_table_pre_render() (line 160 of C:\wamp\www\drupal7\modules\field_ui\field_ui.admin.inc).
SEVERITY	notice
HOSTNAME	127.0.0.1
OPERATIONS	
yched’s picture

Ok, so in your case this is caused by the captcha module. I'll investigate.

For others : please post the debug messages in an attached txt file ;-)

jibberish’s picture

@yched

Thanks very much for the time you've put into this. You are absolutely right.

Test 1
Restore original field_ui.admin.inc and disable captcha
Result
All working

Test 2
Upgrage to captcha 7.x-1.0-alpha2 and enable captcha
Result
Fail

So - I had a little look around the Captcha options and found another test to try:

Test 3
Disabled "Add CAPTCHA administration links to forms" checkbox from withing configuration > captcha
Result
All working

I now have a fully working site. You are my hero!!!! Thanks very much!!!!

As a side note - I have a backup of the site with all the same modules but a with slightly older content types and content with that captcha option still on and everything works in there. If that hadn't been the case, I would've tried disabling captcha - but it worked on an old backup.

Thanks once again for helping me (and hopefully others) here....I really was starting to go a bit insane and lose all motivation.

Jibb

yched’s picture

Status: Active » Closed (duplicate)

Created #1121264: Breaks Field UI's "Manage display" page. in the Captcha issue queue.

Closing this thread as a duplicate.

If other people encouter the bug without having the captcha module enabled, please reopen and provide the debug info described in comment #11 above.

ericxb’s picture

I can confirm a similar problem fixed by disabling "Drupal for Firebug."

In my case, I was trying to reveal hidden fields for the teaser display and received a fatal ajax error.

andrebonfanti’s picture

#17 worked for me
Disabled "Add CAPTCHA administration links to forms" checkbox from withing configuration > people > captcha > general settings.
thanks

jghyde’s picture

This error also occurs with the module http://drupal.org/project/memcache installed on Drupal 7 (I am using Drupal 7.3-dev and memcache 7.x-).

It appears that memcache is not storing the form, or the forms token (?) and the $_POST data is empty, firing off the watchdog('ajax', 'Invalid form POST data.', array(), WATCHDOG_WARNING);.

The returned error is that ^^ above in watchdog. I opened an issue is the memcache module queue #1214536: Drupal 7 content-type fields_ui module ajax forms not getting cached

Anonymous’s picture

Version: 7.x-dev » 7.17
Assigned: htalwala » Unassigned
Status: Closed (duplicate) » Active
StatusFileSize
new1.23 KB

I have the same issue and I don't use the CAPTCHA module...
This error message only appears when Link module or Address Field module are enabled (both or separately).

Someone can help me to fix that?

Thank you in advance.

nebel54’s picture

Hi laurent, i am having the same issues (same debug output) on drupal 7.17 since yesterday. Your directory structure suggests that you are using barracuda/octopus, is that right?

nebel54’s picture

@laurent, if you are using barracuda/octopus: I just found out that there seem to be some cache related issues: Could you try to disable caching, through creating the file sites/all/modules/cache/NO.txt in your platform and check if the problem still appears? That did help in my case.

Anonymous’s picture

Totally right, I'm using BOA-2.0.4 stable.

Anonymous’s picture

Issue solved! You saved my life :)
But, I guess cache is now disabled... Did you found a real fix?

swentel’s picture

Status: Active » Closed (fixed)

So since this is related to barracuda/octopus, not core's fault then, I'd suggest opening an issue in that project.

muschpusch’s picture

omega8cc’s picture