Views 7.x.3-alpha whatever (with the fancy new UI) deprecated the tag:

$view->api_version = '3.0-alpha1';

It must be changed to:

$view->api_version = 3;

In all exported views. Otherwise, everything breaks and hilarity does not ensue.

Comments

agentrickard’s picture

Priority: Normal » Critical

Bumping to critical.

agentrickard’s picture

Status: Active » Needs work
StatusFileSize
new1.69 KB

And a patch.

Of course, this now generates a mystery error on the My Workbench screen.

Notice: Undefined index: uid in views_handler->get_value() (line 264 of /Applications/MAMP/htdocs/workbench/sites/all/modules/views/includes/handlers.inc).
stevector’s picture

agentrickard, what do you mean by "everything breaks?" Editing the View? Even seeing the View? I do not think I've seen the error you are referencing here.

agentrickard’s picture

I can't get the Views to load at all if api_version is non-integer.

agentrickard’s picture

StatusFileSize
new108.03 KB
new55.55 KB

Screenshots. You need Views 3.x beta 3, I believe.

stevector’s picture

This is odd. Views Beta3 is still exporting with

$view->api_version = '3.0-alpha1';

I think it is the

$view->version = 7;

that is making the difference.

agentrickard’s picture

Really? I always change api_version = 3 and it works.

stevector’s picture

Yeah, the beginning of a Views export from beta3 looks like this:

$view = new view;
$view->name = 'workbench_edited';
$view->description = 'Lists content edited by the user.';
$view->tag = 'Workbench';
$view->base_table = 'node_revision';
$view->human_name = '';
$view->core = 0;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

It uses 3.0-alpha1 and 'core = 0'. I'm not sure what 'version = 7' would do.

Maybe we should just talk this through on IRC sometime. I'm sorry for letting this issue drag out considering how small it is.

dave reid’s picture

This should use $view->core = 7 and $view->api_version = 3 as per an IRC conversation I overheard from merlinofchaos. I think using $view->version = 7 is why the views weren't showing up for you Ken.

stevector’s picture

Status: Needs work » Needs review
StatusFileSize
new1.71 KB

OK, I think we're good to go here.

dave reid’s picture

Status: Needs review » Reviewed & tested by the community

Tested using the latest ctools & views from Git and all the views worked correctly and I did not see any errors.

stevector’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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