Closed (fixed)
Project:
Webform
Version:
8.x-5.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
30 Mar 2017 at 09:23 UTC
Updated:
18 Apr 2017 at 11:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostComment #3
jrockowitz commentedIn #2860257: Profile installation is broken when node_webform is profile dependy we wrapped the NodeType with a try/catch statement to suppress the error.
Comment #4
andypostThanx for pointer, looking at patch it needs improve comment and I will try to a bit different approach
Comment #5
jrockowitz commented@andypost Maybe just calling
function_exists('node_type_get_types')will do the trick.Comment #6
andypostThat works for me
- install custom profile & config_installer
- module uninstall
Comment #7
andypostProper fix for uninstall config
Comment #8
andypostTest case
- install node + webform_node
- uninstall webform_node
- make sure no field storage & node type
Comment #9
jrockowitz commentedWhen I uninstall the webform_node any existing 'webform' nodes are losing their content-type and display the below error...
Steps to reproduce
Notes
When I perform the same steps with the book module, I get the below error when I try to uninstall the book module with existing book pages.
The only immediate difference I see between the book module and webform node module is the book module's config is optional but node module is still required.
Comment #10
jrockowitz commentedSo I figured what is throwing the book module uninstall error... the BookUninstallValidator.
We just need to copy the BookUninstallValidator class and service definition over to the webform node module
Comment #11
jrockowitz commentedAttached patch adds the WebformNodeUninstallValidator and move all config into the optional directory.
Comment #12
andypostAwesome idea!
I'll check any node-related parts in webform module - they should be exactly a part of webform_node module (book is nice example)
optional config ++ but require enforce to webform_node module so uninstalled with "feature" but content and submissions needs removal manually somehow
you just deletes files)
Comment #14
jrockowitz commentedI need to take a break. Hopefully this patch applies.
Next steps would be to copy \Drupal\Tests\book\Kernel\BookUninstallTest and tweak it.
Comment #15
jrockowitz commentedI am off for the weekend. @andypost (or anyone else) if you have time to write the needed tests, please reassign this ticket to yourself.
Comment #16
jrockowitz commentedComment #18
jrockowitz commentedHere is a patch with 'decent' test coverage. If it passes, I will commit it.
Comment #20
jrockowitz commentedComment #22
jrockowitz commentedPatch removes code accidentally copied from the book.module.
Comment #23
andypostlooks quietly strange to see classes without use at the top of the file
Comment #25
jrockowitz commented