Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
There are several plugins that provide different ways to select a default argument:
modules/node/views_plugin_argument_default_node.inc
modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
modules/user/views_plugin_argument_default_current_user.inc
modules/user/views_plugin_argument_default_user.inc
plugins/views_plugin_argument_default.inc
plugins/views_plugin_argument_default_fixed.inc
plugins/views_plugin_argument_default_php.inc
plugins/views_plugin_argument_default_raw.inc
But views_handler_argument_date::default_argument_form()
adds its 3 of its own default_argument_type
after views_handler_argument::default_argument_form()
calls views_fetch_plugin_data('argument default');
.
Selecting any of those three ("Current date", "Current node's creation time", "Current node's update time") in the UI works fine, but none of them get exported.
Other than rewriting all of these into plugins, the other option is to adjust the export code to detect these non-plugin options.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1273806-export-date-argument-d6.patch | 1.24 KB | infojunkie |
#1 | 1273806-export-date-argument.patch | 1.36 KB | dawehner |
Comments
Comment #1
dawehnerThis kind of handler is special/hacky so the export method has to be adapted.
Comment #2
tim.plunkettBefore: http://paste.pocoo.org/show/473275/
After: http://paste.pocoo.org/show/473645/
It also works on import correctly.
Comment #3
dawehnerThanks for reviewing and testing the patch, and sure also for providing/finding the bug.
Commited to 7.x
Comment #4
andypostPlease remove dsm()
Comment #5
dawehnerThanks. Commited to 7.x-3.x
Comment #7
infojunkieRerolled the patch for Views 6.x-3.x. Please commit there too.
Comment #8
dawehnerOh, actually i wanted to mark each patch as needs backport if it makes sense.
Thanks for rerolling the patch, committed to 6.x-3.x