Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Mar 2010 at 19:07 UTC
Updated:
15 Oct 2011 at 18:23 UTC
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
Comment #1
aquanox24 commentedSame 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)
Comment #2
sunThanks 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.
Comment #3
delykj commentedSorry, 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:
to new code:
Comment #4
sunThis 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.
Comment #5
brionace commentedThis solution (post #3) sorted the problem for me, thanks.
Comment #6
giorgio79 commentedComment #7
bojanz commentedIs it time to change this?
Comment #8
dawehnerI 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
Comment #9
dawehnerUpdate title
Comment #10
boabjohn commentedSorry 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?
Comment #11
dawehnerThe 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 :)
Comment #12
boabjohn commenteddoh! 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
Comment #13
dawehnerIsn't this fixed already in admin_menu? If yes please close the issue.
Comment #14
boabjohn commentedI 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.
Comment #15
rasheedml commentedsame problem but #3 solved my problem
Comment #16
dawehnerSo this is fixed. It's fixed already in admin_menu
Comment #17
danny englanderSame issue, #3 fixed it for me.
Comment #18
allan1015 commentedHesitently 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:
before this section add:
Comment #19
dawehnerCan't you create a patch for it? Perhaps it's worth to get commited. Let's see
Comment #20
bojanz commentedI'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.
Comment #21
allan1015 commentedThats 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 -
Comment #23
donquixote commentedI 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).
Comment #24
JohnnyW commented#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!