Closed (fixed)
Project:
Webform
Version:
8.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Jun 2015 at 14:21 UTC
Updated:
25 Jan 2016 at 18:14 UTC
Jump to comment: Most recent, Most recent file
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | display_webform_tab-2503105-15.patch | 2.44 KB | sumitmadan |
| #15 | interdiff.txt | 694 bytes | sumitmadan |
| #14 | display_webform_tab-2503105-14.patch | 2.44 KB | safetypin |
| #12 | display_webform_tab-2503105-12.patch | 2.44 KB | sumitmadan |
| #11 | display_webform_tab-2503105-11.patch | 2.44 KB | sumitmadan |
Comments
Comment #1
sumitmadan commentedWorking on it.. almost completed.
Comment #2
sumitmadan commentedCreated a patch that works fine on webform node pages. But the only issue is I am not able to see the tab on the pages.
Comment #3
sumitmadan commentedOops. Forgot to remove a change.
Comment #4
fenstratNice work!
Just a quick code review at the moment, I'll try testing the actual patch later:
Somewhat tempting to create a local variable $node (i.e. $node = $webform_node) rather than using $webform_node. However given $webform_node is what the ParamConvert expects/returns then I guess leaving it as that is ok.
Comment needs to be updated.
Good catch with $node->type => $node->bundle(). There are a few other instances throughout the module, can you split this change off into another issue and we can get it fixed quickly.
We're not creating our own custom entity type here so unless I'm mistaken this is not correct. Also webform_node_update_access() does quite a few additional checks. I think for simplicity lets remov this and keep this patch focused on showing the webform tab on webform enabled content types.
As for not seeing the tab on webform nodes, again I haven't tested the path, but I'd look to something being amiss in webform.links.task.yml
Comment #5
sumitmadan commentedupdated the comments and routing.yml file.
We can create a separate issue for that. Or we can change it page by page I mean while converting menu to route.
Comment #6
sumitmadan commentedComment #7
fenstratThanks.
Unrelated change, please remove.
Grammar is off. How about: "Parameter converter for upcasting webform node ids to full objects."
This comment needs to stay.
Comment #8
sumitmadan commentedThanks. Updated the changes.
For tab, I will look at it. I didn't find a way yet, to add tab only on webform enabled node.
Comment #9
fenstratNeeds work for showing the tab.
Also #7 4. still needs to be addressed.
Thanks for your work here @sumitmadan
Comment #10
sumitmadan commentedMy bad (removed wrong comment).
Comment #11
sumitmadan commentedI have removed the ParamConverter class and added access_check_token. Please review its working now. :)
Comment #12
sumitmadan commentedOops used my test key. Update now.
Comment #13
safetypinI'm still seeing the webform tab on node types that aren't webform-enabled. I'm not 100% certain I'm testing correctly:
1) Downloaded Drupal-beta14 (drush)
2) Performed fresh install, standard profile
3) Cloned the webform repository, and checked out the 8.x-4.x branch
4) Downloaded the patch from #12
5) Applied it using git
6) Ran drush cache-rebuild
Comment #14
safetypinIt looks to me like there was a misplaced ! on the check for the node setting: WebformNodeAccessCheck.php:42. Removing the ! from the second condition of that if statement seems to have the desired result for me.
Comment #15
sumitmadan commentedComment #16
fenstratCommitted and pushed to 8.x-4.x. Thanks!
In the interest of forward progress I've gone ahead and committed #15 with minor changes. Thanks for your work here @sumitmadan.