Hi all

I'm upgrading the Views PDF module to Views 7.x-3.x. I have some trouble by adding a new display. I get always this error:

Fatal error: Call to a member function get_option() on a non-object in ../modules/views/plugins/views_plugin_style.inc on line 37 

Is there any documentation about how a new display has to be added in 3.x? Is there a documentation whats the difference between API 2 and API 3? Is a upgrade necessary or can I use also API version 2 in Views 3.x?

Thanks in advance for answer my questions.

Comments

bojanz’s picture

There is a page in Advanced help: Views' API -> Upgrading to Drupal 7 (API).
Thought I don't think it covers your problem.

hunziker’s picture

Hi bojanz

Thank you very much. The first paragraph was the breakthrough.

Handler registry

Views now uses Drupal's dynamic-loading code registry.
You can safely remove your implementations of hook_views_handlers(), since they are no longer used.

Please remember to specify the handlers in your module's .info file. For example:

name = Example module
description = "Gives an example of a module."
core = 7.x
files[] = example.module
files[] = example.install

; Views handlers
files[] = includes/views/handlers/example_handler_argument_string.inc
bojanz’s picture

Status: Active » Fixed

Okay, then :)

Status: Fixed » Closed (fixed)

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