When configuring a node reference field in a view using the formatters4nodereference there are two javascript alerts

This shows up when trying to edit or delete the field (so I can't delete the field)
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /mathimages/admin/structure/views/ajax/config-item/test_gallery/page/field/field_image2
StatusText: OK
ResponseText:
Fatal error: Call to undefined function field_ui_formatter_options() in /usr/local/apache2/htdocs/mathimages/sites/all/modules/formatters4nodereference/formatters4nodereference.module on line 75

This shows up randomly (maybe when trying to update the preview at the bottom of the page:
An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /mathimages/admin/structure/views/view/test_gallery/preview/page/ajax
StatusText: OK
ResponseText:
Fatal error: Call to undefined function _field_formatter_view() in /usr/local/apache2/htdocs/mathimages/sites/all/modules/formatters4nodereference/formatters4nodereference.module on line 168

Comments

amirdt22’s picture

Priority: Normal » Minor

So maybe we don't need to use this for views - I think I can accomplish the same thing with views relationships.

ayalon’s picture

Priority: Minor » Critical
StatusFileSize
new1006 bytes

Here is a fix:

Without this patch, the module is useless with the latest views / drupal version.

damienmckenna’s picture

Issue summary: View changes
Status: Active » Needs work

The patch needs to be rerolled.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new723 bytes

Rerolled and fixed a syntax bug - the function name passed to function_exists() must be in quotes.