Scenario 1:
Add a new view, clicking through the wizard.
Change the style plugin.
Click through the options form.
Hit save.
Default style options are available in $view->style_options, $view->style_plugin->options, and from $view->display_handler->get_option('style_options').
Scenario 2:
Add a new view, and in the wizard, change the style plugin.
Hit save.
Default style options are available in $view->style_plugin->options. $view->style_options and $view->display_handler->get_option('style_options') are empty.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1429426.patch | 460 bytes | dawehner |
Comments
Comment #1
tim.plunkettSwitching all of my code to use
$view->style_plugin->optionsworks just fine, but views created without visiting the style options form (aka created via the wizard) will always have an empty$view->style_options.Comment #2
dawehnerI just tryed to exactly understand what you observed:
Scenario 2:
Add new view => insert name => change style => continue and edit => look at $plugin->options
Then the plugin had the default options given in option_definition.
Scenario 1:
Add new view => insert name => change style to table => continue and edit => change style to grid => $plugin->options had the options given in option_definition.
Which of the three ways did you used in your code? Here is a patch which marks style_options as deprecated
Comment #3
tim.plunkettHere's the issue for fullcalendar where I was doing it wrong and switched it with success.
#1429458: Views aren't set up properly from wizard
But I still think it's weird that the options are set on the display when submitted via the form, but not from the wizard.
Comment #4
tim.plunkettOkay, so #3 should be ignored, I was just accessing the options wrong.
This issue needs a better title to reflect the patch in #2.
Comment #5
dawehnerYeah one less issue. Committed to 7.x-3.x