I get the following error at update with the new 6.x-3.0-alpha4:

Fatal error: Call to undefined method views_plugin_display_system::get_access_plugin() in K:\wamp\www\matine3\sites\all\modules\admin_menu\admin_views\plugins\views_plugin_display_system.inc on line 59

I'm using Views 6.x-3.0-alpha2.

Comments

aquanox24’s picture

Same Error when using flush Menu- und Administationmenu-Caches. Other Flushing works.
Version 6.x-3.0-alpha4
Views 6.x-3.x-dev (2010-Mär-17)

sun’s picture

Status: Active » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #739092: admin_views module requires latest Views dev snasphot. Please search for existing issues before submitting a new one.
You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.

delykj’s picture

Title: Error at update with new 6.x-3.0-alpha4 » Error at update with new 6.x-3.0-alpha4 (incompatible with Views 6.x-3.x)
Status: Closed (duplicate) » Active
Issue tags: +Views 6.x-3.x

Sorry, I reopen it, because I get a different error and updating to the latest Views 3 CVS checkout not solves the problem.
I made a fresh checkout of Views 6.x-3. (Currently there is no 6.x-3.x dev release on the project page.) I searched for the get_access_plugin string in the whole Views directory without results.
You calling "views_plugin_display_system::get_access_plugin" method, but this isn't defined anywhere in Views 6.x-3.x

Here is the fix. In views_plugin_display_system.inc change
Old code:

$access_plugin = $this->get_access_plugin();

to new code:

$access_plugin = $this->get_plugin('access');
sun’s picture

Title: Error at update with new 6.x-3.0-alpha4 (incompatible with Views 6.x-3.x) » admin_views incompatible with Views 6.x-3.x
Priority: Critical » Normal
Status: Active » Postponed

This is a known issue and already fixed in admin_menu 7.x-3.x.

Views 6.x-3.x still declares "2" as compatible API version, although the API heavily changed. You need the latest dev snapshot of Views 2.x.

I guess there's little we can do here until Views 3.x is fixed.

brionace’s picture

This solution (post #3) sorted the problem for me, thanks.

giorgio79’s picture

Project: Administration menu » Views (for Drupal 7)
Version: 6.x-3.0-alpha4 » 6.x-3.x-dev
bojanz’s picture

Status: Postponed » Active

Views 6.x-3.x still declares "2" as compatible API version, although the API heavily changed.

Is it time to change this?

dawehner’s picture

I don't think we want to do this. If we change the minimum api version nearly every contrib / custom module looses it's views integration until a patch.

I don't think we can do this in the moment because the issue queue will be FULL as never. Before we do this we definitive should provide patches for the main contrib modules
and clearly spread this out to the folks using views 3.x

dawehner’s picture

Title: admin_views incompatible with Views 6.x-3.x » Update views_minimal_version

Update title

boabjohn’s picture

Sorry for any confusion, but I've just tried the latest dev snapshot and it fails with the message in this issue.

The hack in #3 looked good, but going to the views/plugins/ directory, there is no file called:

views_plugin_display_system.inc

What am I missing?

dawehner’s picture

The plugin views_plugin_display_system is part of admin_menu. I don't have an idea how you managed to copy this file into views :)

boabjohn’s picture

doh! thanks heaps dereine...got turned around. For any other wanderers, the file to change (at #3) is:

../all/modules/admin_menu/admin_views/plugins/views_plugin_display_system.inc

dawehner’s picture

Isn't this fixed already in admin_menu? If yes please close the issue.

boabjohn’s picture

I just ran an update to Views/CTools/Panels and Admin Menu...all using latest devs. Still had the error and had to hand patch with #3.

rasheedml’s picture

same problem but #3 solved my problem

dawehner’s picture

Status: Active » Fixed

So this is fixed. It's fixed already in admin_menu

danny englander’s picture

Same issue, #3 fixed it for me.

allan1015’s picture

Hesitently upgrading to views3 - driven by Solr integration and SolrViews - hesitant because of earl stage

I had same issue and modifying the admin_mind module as in #3 did work, though if Views3 doesnt work out for me I have remove the patch to rollback to Views2

The problem is Views is changing the API from Views2 to Views3.
If there are other Modules that will need patching to support Views3 api - Id rather fix it in one place - in Views3
So instead of #3 patched Views3 to support the old API as below, basically I added definition for the old Views2 API and redirected to the Views3 API

Of course Ill have to manually apply this on each Views3 update

Is it offbase to ask if some support for Views2 API calls be added to Views3 baseline?

In the Views 6.x-3 folder (likely in sites/all/modulest /views or in modules/acquia/views )
in the file: plugins/views_plugin_display.inc,

Locate this section of the file:

   /**
   * Get the display or row plugin, if it exists.
   */
  function get_plugin($type = 'style', $name = NULL) {

before this section add:

  /**
   *  Views2 API to Views3 API
   *  This function supports migration from Views2 to Views3  
  */
  function get_access_plugin($name = NULL) {  // Views2 API 
	$this->get_plugin('access',$name);  // Mapped to Views3 API
  }
dawehner’s picture

Can't you create a patch for it? Perhaps it's worth to get commited. Let's see

bojanz’s picture

I'm against adding cruft to support legacy code. It's completely against Drupal philosophy.

A smarter idea is to assemble a list of modules that need porting, and then we can all go and submit patches where appropriate.
dereine already did that a couple of times, If I remember correctly, and as a result most important modules now support Views 3.

allan1015’s picture

Thats cool, I've no background on Drupal philosophy to argue, - though if you could point me to such a discussion I am curious.

Anyway, Views2 is not Legacy, Views3 isnt released, is it, Views2 isnt depreicated is it? So I am talking as a transitional period

In any case, I am just a lowly user and implementor, I prefer to patch things in one place, then in many seperate places - thats an operational philosophy. Also I didnt want to patch admin_menu to be only compatible with Views3 which #3 does.

But hey if all this is just about admin_menu - no biggy, I couldnt tell from the write up how many API changes there were nor how many other modules would be affected -

Status: Fixed » Closed (fixed)

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

donquixote’s picture

I have this problem with admin_menu, and people link back here.
#739092: admin_views module requires latest Views dev snasphot

The trick described in #18 applied to views-6.x-3.0-alpha3 yields
"Cannot redeclare views_plugin_display::get_access_plugin()"

Also, it does not seem to be a solution for that linked issue.
(yeah noone here said it would, so i say this only "for the record" and for documentation)

UPDATE:
Now it works (with the trick in #18 adapted). I had the wrong version before (some trouble with drush dl destination).

JohnnyW’s picture

#3 worked for me too --- file found in \sites\all\modules\admin_menu\admin_views\plugins :)

------------

Here is the fix. In views_plugin_display_system.inc change

Old code:

$access_plugin = $this->get_access_plugin();

to new code:
$access_plugin = $this->get_plugin('access');

-------------

Thank you!