$ drush -y dis views; drush cc all
The following extensions will be disabled: views
Do you really want to continue? (y/n): y
PHP Fatal error:  Class 'views_handler_argument' not found in /media/sf_src/public_html/drupal-7/sites/all/modules/contrib/link/views/link_views_handler_argument_target.inc on line 11

Fatal error: Class 'views_handler_argument' not found in /media/sf_src/public_html/drupal-7/sites/all/modules/contrib/link/views/link_views_handler_argument_target.inc on line 11
Drush command terminated abnormally due to an unrecoverable error.                                                                                                 [error]
Error: Class 'views_handler_argument' not found in /media/sf_src/public_html/drupal-7/sites/all/modules/contrib/link/views/link_views_handler_argument_target.inc,
line 11

Comments

finn lewis’s picture

I just got this with a fresh install of link 7.x-1.x-dev - when views was not enabled.

PHP Fatal error: Class 'views_handler_argument' not found in /var/www/www.oxfam.local/sites/all/modules/contrib/link/views/link_views_handler_argument_target.inc on line 11

Enabling views suppressed the error.

traviscarden’s picture

Priority: Normal » Major

Yikes. A fatal error out-of-the-box qualifies as major, at least. If nothing else, the module should declare a dependency on Views.

jmuzz’s picture

I can confirm this error. The front page of https://drupal.org/project/link declares that it has no dependencies, so I think the best solution would be to make it work without views.

jcfiala’s picture

Well, you know, I do survive on the kindness of strangers - that is to say, I like patches. But I probably can take a little time to figure out why I'm having this problem and other fields don't.

jcfiala’s picture

Say, jmuzz, what exactly where you doing when you got the error, anyway?

jcfiala’s picture

Issue summary: View changes
Status: Active » Postponed (maintainer needs more info)

Okay, I can't manage to reproduce this at all. I need more help with it. I installed views, cleared the cache, uninstalled views, cleared the cache - no errors.

jmuzz’s picture

I was setting up a site using the latest git source for core and the modules. I imported some data types using features (one of which had some link fields) then I tried to use the migration module to import some data into it. I got the error during the migration, and when I activated views it worked. Did you try adding data to a link field when views isn't installed?

duaelfr’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I have the same issue and I found its source.
Having Migrate enabled but Views disabled causes the issue because Migrate tries to load link's view handlers to find out if they are migration classes.

Steps to reproduce:
$ drush si minimal
$ drush en -y migrate link
$ drush mar

Expected result:
No result

Given result:
Drush command terminated abnormally due to an unrecoverable error
Error: Class 'views_handler_argument' not found in sites/all/modules/contrib/link/views/link_views_handler_argument_target.inc, line 11

So, in my case, this is related to migrate auto registration. As this issue is around a year old and there is an issue in the Migrate issue queue, I take the freedom to close it as duplicate and cross reference the two issues if someone's having the same problem as me.

duaelfr’s picture