If features module implements hook_views_api automatically

function search_frontend_views_api() {
  return array("version" => "3.0");
}

with the api documentation, you see the other key 'api'.

function hook_views_api() {
  return array(
    'api' => 3, 
  );
}
CommentFileSizeAuthor
#1 features-1821816-1.patch607 bytesdawehner

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new607 bytes

Here is a easy patch for that.

bojanz’s picture

Status: Needs review » Reviewed & tested by the community

Noticed this myself. Looks good!

mpotter’s picture

Status: Reviewed & tested by the community » Needs review

Hmm, not sure about this one. Why would Views have a different API than other CTools plugins? You'll notice near the code in the patch that 'version' is still used for non-Views plugins.

Please post some cases that are causing an error/problem with the existing code.

This patch needs a LOT more testing by the community before I can commit it since it could cause problems with existing feature exports. I'm not enough of a CTools expert to really understand the impact of this change. So please get some more eyes on this and I'll also do more local testing here.

mpotter’s picture

Assigned: Unassigned » mpotter

Ahh, a chat with TimPlunkett explained this one. Views *is* different than other Ctools plugins (uses 'api' instead of 'version'). Looks like CTools has a special case for handling this (http://drupalcode.org/project/ctools.git/blob/refs/heads/8.x-1.x:/includ...) so I'll add this as soon as I merge the 1.1 UI branch later this week.

mpotter’s picture

Status: Needs review » Reviewed & tested by the community
dawehner’s picture

I'm sorry for this horrible written issue, was in kind of a hurry.

mpotter’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 90cda83

Status: Fixed » Closed (fixed)

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