Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
content_moderation.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Feb 2017 at 16:33 UTC
Updated:
17 Mar 2017 at 11:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jhedstromComment #3
jhedstromI'm sure there's a more elegant fix that this, perhaps in the entity form routing system somewhere?
Comment #5
jhedstromSo I think this would be an issue with any entity form route that has dashes in the link template name?
Comment #6
sam152 commentedI wonder if the FormHandler should just replace hyphens with underscores when firing the hooks. Not sure if that would be an API change given technically new hooks would be firing.
Comment #7
himanshu-dixit commentedComment #8
timmillwoodAnother option would be just changing the hyphens to underscores.
Comment #10
sam152 commentedThe convention elsewhere seems to be hyphens. Re suggestion in #3, making this part of EntityForm makes sense to me.
Comment #11
timmillwoodSo it looks like we're moving this out to be a standard entity system issue.
#10 seems fine to me, as long as test bot agrees.
Comment #13
timmillwoodBack to RTBC, only test-only patch failing.
Comment #14
himanshu-dixit commentedRTBC+1 @sam152 You are right. Just a piece of advise, try to upload test-only patch before the full patch, this way Status won't be set to Needs Work , I suppose.
Comment #15
alexpottCommitted and pushed 973e6b4 to 8.4.x and 3a18f95 to 8.3.x. Thanks!
Probably my mistake.
Committed to 8.3.x since workflow is experimental.
Comment #20
alexpottI got this wrong - we shouldn't be changing the EntityForm implementation. That's unnecessarily risky - we should be doing the same as \Drupal\workflows\Form\WorkflowTransitionDeleteForm::getFormId(). Sorry for the false commit.
Comment #21
alexpottIs what
\Drupal\workflows\Form\WorkflowTransitionDeleteForm::getFormId()doesComment #22
timmillwood@alexpott - You think we should just hardcode the form IDs?
I quite liked the idea in #10 as this solves the issue across the whole of core and adds a test for it too.
Comment #23
alexpott@timmillwood I think it is an okay idea but I think that the fix is not 8.3.x because it is a behaviour change. So let's do the quick fix here and open a followup to discuss the entity form fix with the entity maintainers.
Comment #24
sam152 commentedOpened #2856645: Operations with hyphens should create entity form IDs with underscores.
This patch has form IDs consistent with the current defined ones and the form class names, however it's contrary to how the entity form would have generated the UI using the opperation. workflow_state_edit_form vs workflow_edit_state_form.
Comment #25
timmillwoodThe patch looks good from the Workflow point of view.
Don't think we need a test for this.
Comment #26
jhedstromI added a follow-up to discuss the more global fix: #2856792: Possible to create entity forms with a '-' in the form ID
Comment #27
alexpottCommitted and pushed eb83216 to 8.4.x and 82f2015 to 8.3.x. Thanks!
As this is an experimental module backported to 8.3.x