Problem/Motivation
When I try to select the "Current date" option (same issue applies for "Current node's creation time" and "Current node's update time") when providing a default value on a date argument' settings form I get the following error.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "date" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 57 of /var/www/html/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
This is happening because ArgumentPluginBase::validateOptionsForm() and ArgumentPluginBase::submitOptionsForm() are looking for a plugin. These date arguments defaults are not plugin and are only defined within the date argument plugin.
Proposed resolution
Fix it. Add test coverage.
Remaining tasks
Fix it. Add test coverage.
User interface changes
None
API changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff.txt | 168 bytes | rcodina |
| #12 | edit_issue_can_t_select-2567773-1.patch | 2.86 KB | rcodina |
| #5 | 2567773-5-complete.patch | 2.87 KB | geertvd |
| #5 | 2567773-5-test.patch | 1.87 KB | geertvd |
| #2 | 2567773-2.patch | 2.49 KB | geertvd |
Comments
Comment #2
geertvd commentedComment #3
geertvd commentedWill remove that double enter in my next patch which should include test coverage.
Comment #4
geertvd commentedPatch in #2 Doesn't completely solve the issue yet.
Comment #5
geertvd commentedI think this is a better fix + test.
Comment #6
geertvd commentedBumping this to Major since this generates a php error.
Comment #9
rcodinaWorking on the major issue triage at DrupalCon Barcelona 2015
Comment #10
rcodinaPatch 2567773-5-complete.patch works for me, even on custom date fields. Now we should expect some experienced developer to also check this before setting this to RTBTC state.
Comment #11
valthebaldSmall typo: there's double "the" in test method docblock: "Tests the date default argument type on the the CreatedFullDate handler."
Comment #12
rcodinaSolved!
Comment #13
valthebaldWe have evaluated the issue with @rcodina (me being a mentor) on the mentored major issue triage:
Comment #14
geertvd commentedActually this is handled better in #2325899: UI fatal caused by views argument handlers no longer being able to provide their own default argument handling, I'm going to close this as a duplicate. Perhaps we can move the test coverage to that ticket.
Comment #15
rcodinaComment #16
nathan tsai commentedWork around, (requires applying a patch to View Argument Token):
https://www.drupal.org/project/views_argument_token/issues/2853584