Fatal error: Call to undefined function link_views_content_field_data() in /home/sites/all/modules/link/link.module on line 148
i presume the error related a compatiblity issue with the latest dev Views

Drupal 6.4
CCK 6.x-2.x-dev (2008-Sep-05)
Views 6.x-2.x-dev (2008-Sep-04)

CommentFileSizeAuthor
#15 link-views-handlers.patch1.33 KBMoonshine

Comments

zmove’s picture

Same here

Joe Malik’s picture

Same Problem here after updating CCK 6.x-2.0-rc6 to 6.x-2.x-dev (2008-Sep-05).

cps@groups.drupal.org’s picture

Me too. I get the error after the cck upgrade (from today) but I think the last views is the real cause.

Jeremy Toaster’s picture

Fatal error: Call to undefined function link_views_content_field_data() in /Library/WebServer/Documents/mysite/www/sites/all/modules/link/link.module on line 148

I too am getting this error. Had to disable Link module.

Jeremy Toaster’s picture

CCK was updated today, but LINK is still not working.

quicksketch’s picture

Status: Active » Needs work

Views 2 broke it's API a few days ago. See http://angrydonuts.com/attention-views-api-developers for more information.

I've updated the dev version of link module with compatible code, though things still seem to be pretty broken, like you can't add a link title to sort criteria, filters, or arguments. Link never provided any of this information before, so it might be caused by the CCK integration with Views (which also was just updated).

pancho’s picture

Title: Fatal error: Call to undefined function link_views_content_field_data() in ...link.module on line 148 » Link module broken by Views2 RC2 (and the subsequent CCK update)
Priority: Normal » Critical

I marked two more issues as duplicates:

The former also contains a - so long untested - patch by blackdog.

chrissearle’s picture

subscribe

gundarx’s picture

subscribing to this too

jvieille’s picture

How long could it take to get a fix?

Moonshine’s picture

You'll see that Quicksketch did apply changes for Views2 on Sept 6th:

http://drupal.org/project/cvs/74971

Which are in the dev at this point:

http://drupal.org/node/240722

mrtoner’s picture

Status: Needs work » Fixed

I can confirm that the current dev does work with Views 2 rc2. Don't understand why it's a 1.x dev, though.

No patch on this issue -- setting to fixed.

Moonshine’s picture

Yeah.. the branching is a little screwy with links. It just needs to be setup for drupal-6--2. But for now the dev lives there. :/

pancho’s picture

Status: Fixed » Active

I would say it's only fixed if all problems are gone. Quicksketch said:

I've updated the dev version of link module with compatible code, though things still seem to be pretty broken, like you can't add a link title to sort criteria, filters, or arguments.

It's not yet proven that the rest is a CCK bug.
Also, please roll out a proper 2.3 dev release! Thanks.

Moonshine’s picture

Status: Active » Needs review
StatusFileSize
new1.33 KB

@quicksketch

CCK changed its handler naming a few weeks ago to get itself out of the Views' namespace, see:

#298823: Views integration using Views' namespace

with the resulting changes:

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/cck/include...

Attached is a patch to update things to the new cck handler names. Views arguments, sorting, and filters work after applied.

I didn't change naming of the two custom handlers you are creating, as you may have preferences for that.

emilyf’s picture

subscribing

jvieille’s picture

1) Why the Link dev http://drupal.org/node/240722 mentioned in #11 does not appear on the Link project page http://drupal.org/project/link ?

2) I pathced the link.view.inc as indicated, but it still doesn't work

In a view that lists all the defined books, the filter for the book page level 0 indicates this error:

Error: handler for book_menu_links > depth doesn't exist! Node: Type = Book page

3) a Views update showed up in my available update page, though I downloaded the dev version yesterday. Might it solve this problem?
both 6.x-2.0-rc2 6.x-2.x-dev are mentionned for the same date???

Thanks for help

emilyf’s picture

@jvieille - see http://drupal.org/node/60108 for how to apply patches. it seems frightening at first (backup your database and files first), but it's actually pretty simple.

jvieille’s picture

Thanks for you so fast response...
In the meantime, I tried to understood and patched the file directly: I opened the file, made the changes be replacing the (-) stuff by the (+) stuff...
The hard way apparently, but should be equivalent???

Moonshine’s picture

@jvieille

1) The maintainer of Link just doesn't have the dev release attached to the project page. Maintainers have options on what they want to include for download on that main project page. However, all the releases for Link are always shown at http://drupal.org/node/74971/release

2) To use that patch you must be patching against that latest dev version of Link.

3) At this point I'd suggest running the latest RC of both CCK and Views. Many changes have taken place in both over the last few weeks, and both have recent RC releases. Those two combined w/ the latest dev of Links and the patch above should be functional. At least it is for me on the 3 servers I handle.

jvieille’s picture

I am running all the last CCK and Views releases.
I am reuuning the last Link dev called "link-6.x-1.x-dev" ad patched the link.views.inc file

However, my view "books" still does not work

The filter I set for selecting the node type "book page" and the page level 0 (which corresponds to the books' headers) indicates
Error: handler for book_menu_links > depth doesn't exist! Node: Type = Book page

When I try to redoing it, it does not offer the "depth" selection anymore

The other views seem to work correctly

Note: the link.views.inc file was 12K in link-6.x-2.3.1, it is currently 5K in link-6.x-1.x-dev

Moonshine’s picture

Have you cleared your views cache?

Note: the link.views.inc file was 12K in link-6.x-2.3.1, it is currently 5K in link-6.x-1.x-dev

Yes.. quicksketch broke handlers out into separate files under a views directory in the dev release.

jvieille’s picture

I did after reading your post. Same behaviour

When trying to create again this filter, after selecting the "Book page" type and updating, the following error is displayed in
Broken/missing handler = Array
Node: Type = Book page

under the Filters zone

chasz’s picture

these errors are only on the views.module display pages right???

so any display under normal drupal core still works?

jvieille’s picture

Yes, this error I mention is on the Views module page that edits this particular view.
However, the usage of the view is consistent with this error: When I try to create content that uses this view to select a particular book, it lists all book pages (the filter doesn't act)

fosstux’s picture

subscribing

BloodyNO’s picture

subscribing!

Moonshine’s picture

@jvieille

Your error isn't coming from the CCK Links module or any fields created with it. The filter handler "book_menu_links" is one provided by Views itself for the book module. So you will want to add to an issue already started there for missing book handlers:

#306388: No Book available in Views after update

For others subscribing, there is a workable version if you take the dev version from here (which is actually the latest 2.x dev regardless of the 1.x label):

http://drupal.org/node/240722

And patch it with the patch in comment #15

Jaxen’s picture

Thanks for providing a solution to this annoying problem. Links works fine again!

mrtoner’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

jvieille’s picture

You were right.
The books related problem was solved this nigtht with the last Views dev.

Thank you for your help

reikiman’s picture

subscribing

becw’s picture

I just ran into this issue after an update (D6.4, cck 2.0-RC6 -> 2.0-RC7 and views 2.0-RC1+patches -> 2.0-RC2); the original issue is fixed for me in the link 6.x-1.x-dev package (as of Sept 7 I guess). Possibly another official release is in order?

Also, I'm not running into errors on any Views as #15 suggests, probably because I'm not using link titles at all; I'm guessing that patch will still be necessary at some point?

p.s. @pancho -- dev snapshot is here: http://drupal.org/node/240722 (it's just not linked directly on the module page)

Moonshine’s picture

@bec

The patch in #15 is just to correct several handler names for Link fields, but you won't run into an error if you aren't using them in a view. I'll drop quicksketch a line here tonight to see if he can review and commit it so it's in the dev release, but he's a busy guy. :)

jamiefifield’s picture

Subscribing, would love to see an official release once all the kinks are worked out.

becw’s picture

@moonshine -- understood :)

The points I meant to make were that:

  • this thread covers two issues, the original 'undefined function' and the other 'cck handler name change', and that the first is fixed in dev and the second is not
  • the current 'recommended' release of link throws a fatal error when used with the current 'recommended' releases of Views and CCK; this fatal error is fixed in dev (even though the views handler issues aren't). It would make sense to have either the dev release or a fresh tagged release listed on the module page so that users doing new installs don't have to deal with this error.
westwesterson’s picture

subscribe

markus_petrux’s picture

subscribing

itkadmin’s picture

subscribe

jhedstrom’s picture

subscribe

jim kirkpatrick’s picture

subscribe

mshmsh5000’s picture

subscribing

kepford’s picture

Subscribing

Jeremy Toaster’s picture

Calendar 6.x-2.x-dev (2008-Sep-17)
Content Construction Kit (CCK) 6.x-2.x-dev (2008-Sep-17)
CCK Blocks 6.x-1.1
Date 6.x-2.x-dev (2008-Sep-18)
Link 6.x-2.3.1
Views 6.x-2.x-dev (2008-Sep-17)

Latest DEV of all version, error has gone away and Link seems to be working fine for me.....

Take that back,
Just tried to create a LINK field for a custom Content Type,
Label : Website
Field : field_website
Type : Link
Text Fields for Link Title URL

Clicked SAVE and it nothing.
Got a white page.
Now tried going to other areas of site and getting this again....

Fatal error: Call to undefined function link_views_content_field_data() in /Library/WebServer/Documents/mysite/www/sites/all/modules/link/link.module on line 148

Strange though, LINK was not causing any errors, until it was tried to be used.

Jeremy Toaster’s picture

I moved the LINK module folder, refreshed site, back to normal, browse to VIEWS, clear cache, go to Content Types, and the field is now there.

Jeremy Toaster’s picture

The field I created is there, but it is not tied to any Field Type, that part disappeared, if I replaced the Link folder, site goes white again.

gunsoftommy’s picture

subscribbles

Moonshine’s picture

@Jeremy Toaster

Your original error of undefined function on link_views_content_field_data() sounds like you either had old link code still or hadn't cleared caches after installing things. (Both Drupal and Views have caches). That function does exist, but is in a new views file that is part of the dev and didn't exist before that. Personally I'd remove that field you created... put the latest dev in place, patch it with #15 and then run update.php and clear Views cache before trying to create anything..

Edit: I just saw you were using Link 6.x-2.3.1 in that comment which doesn't have any of the fixes for views or cck in it. You'll need the Links dev release (that's marked incorrectly as 1.x) and patch it with the patch in #15.

Jeremy Toaster’s picture

Will there be a proper Tarball update that is the corrected version with the included patch?

neofactor’s picture

subscribing

johnnoc’s picture

Though I would love to help and test the patch, all my sites are live now and I don't have the correct versions of the modules on my sandbox. I hope to see an official release rather than just applying a patch. :-)
+1 on #35 and #49

Thanks a lot for your work on a very useful module, btw.

John
Drupal Norge
the norwegian Drupal community

miiimooo’s picture

subscribing

himerus’s picture

subscribe.

I had this error pop up with the latest versions of CCK/Views installed, and THEN adding the Link module after the fact.

chasz’s picture

if this is fixed how come it not on download?

might help new users?

mrtoner’s picture

Hey, moonshine, I'm not going to let you have all the fun:

For those of you haven't read the issue and all the comments and just scroll to the end and pile on, scroll back up to #15 and patch the latest (as of today) dev version to fix the error.

And rather than subscribing, just monitor your Available Updates and you'll be notified of a new version.

Qriz-1’s picture

I'm sorry 4 this stupid question but ....

how to apply this patch???

thx

mrtoner’s picture

Not a stupid question at all. See http://drupal.org/patch/apply

Edit: drupal, not druppal!

Qriz-1’s picture

thank you very much ;-)

here is the working link without the extra p in drupal

http://drupal.org/patch/apply

quicksketch’s picture

Status: Reviewed & tested by the community » Fixed

Thank you, thank you, thank you Moonshine. I've been traveling an extraordinary amount recently which has made maintaining my modules difficult. The Views API change was extremely untimely. I've committed your final fixes and I'll get out a new version tonight.

Also, you might have noticed #304906: Link needs a new maintainer, any takers?

jensimmons’s picture

I had this exact problem, too. Just downloaded Link 6.x-2.5 this morning, and replaced 6.x-2.3.1. The new version works great. Fixes the conflict with Views. Doesn't create any new problems.

Thanks! Just in time for what I'm doing.

quicksketch’s picture

Thanks for the confirmation!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

scottrigby’s picture

Version: 6.x-2.3.1 » 6.x-2.5
Status: Closed (fixed) » Active

I'm having the exact same issue with version 6.x-2.5

well almost... the error is one line off:
Fatal error: Call to undefined function link_views_content_field_data() in MYURL/sites/all/modules/link/link.module on line 149

After adding this field, any Views display returns this error.

Has anyone else experienced this since the update?

quicksketch’s picture

Version: 6.x-2.5 » 6.x-2.4

scottrigby, please open a new report. With several users confirming the original problem has been solved, your's is likely a different issue.

quicksketch’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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