- 🇩🇪Germany andrerb
Re-roll patch
- Fix error for taxonomies
- update for D10 compatibility - last update
almost 2 years ago Composer require failure - last update
almost 2 years ago 8 pass - 🇩🇪Germany andrerb
Update D10 compatibility from #13
- remove obsolete "core: 8.x" from .info.yml - 🇩🇪Germany SteffenR Germany
I've updated the patch to work with latest 8.x-1.x-dev/ 8.x-1.7.
Unfortunately i cannot push to the existing Merge Request.
- 🇩🇪Germany SteffenR Germany
Updated patch, cause i missed a duplicate line..
- 🇩🇪Germany SteffenR Germany
Finally.. ;) Sorry for confusion in the last comment.
- 🇩🇪Germany SteffenR Germany
And another reroll, because the method entityIsPublishable was not working correctly, because the name of the module was passed to getDefinition instead of the bundle name.
@AndreRB: It would be great, if you could update the MR with the latest patch. 💚
- 🇩🇪Germany SteffenR Germany
The patch still had problems while translating entities, because the route object did not contain the _entity_form key.
I added an additional check for filled $form_arg and a logic to get the entity_type_id from the route object. - Status changed to Needs review
over 1 year ago 6:50am 10 October 2023 - First commit to issue fork.
- 🇩🇪Germany stborchert
Sorry, I f*d up MR5. Created a new branch: https://git.drupalcode.org/project/require_on_publish/-/merge_requests/15
Credits go to @AndreRB and @SteffenR
- 🇬🇧United Kingdom AaronMcHale Edinburgh, Scotland
This doesn't seem to work for paragraphs which have been added to storage entities → , where storage entities are embedded using inline_entity_form. For that matter, it also doesn't work for any field added in a storage entity.
Maybe there's a way to make this work for more than just paragraph entities, like any entity which is embedded within the parent entity using inline_entity_form?
- 🇬🇧United Kingdom AaronMcHale Edinburgh, Scotland
My previous comment may not apply actually., I had not set the entity reference field itself to require on publish, after doing that things seem to be working better, but I need to do some testing tomorrow.
- First commit to issue fork.
- 🇩🇪Germany stborchert
@TejaVardhanReddy Patches are always created to the development branch, not existing releases. 8.x-1.0 is already released and cannot be changed anymore.
Additionally, when providing a patch, please add an interdiff → , so reviewers can see what has changed since the last patch. - 🇺🇸United States markdorison
Please ensure that the lastest changes are included in a merge request so that tests can be run. Tests are no longer run on patches since we have switched to GitLabCI → .
- 🇩🇪Germany SteffenR Germany
steffenr → changed the visibility of the branch 3178100-content-moderation-support to hidden.
- 🇩🇪Germany SteffenR Germany
steffenr → changed the visibility of the branch 3178100-paragraphs-cant-get to hidden.
- 🇩🇪Germany SteffenR Germany
steffenr → changed the visibility of the branch 3178100-paragraph-validation to hidden.
- 🇺🇸United States jcandan
Title scope seems to duplicate ✨ Required on Workflow State Active , however a cursory review of the issue summary and discussion lead me to think not so.
Either way, I do wonder if there's any chance ✨ Add require on publish as a conditional field option Active fixes this. I haven't tested, but since it adopts
#states
condition handling, that might address this issue. - 🇺🇸United States jcandan
Ya know! Actually, I missed this ticket when I created 🐛 Fix Paragraphs support with Content Moderation Active . Please take a moment to review the patch/MR there. Sorry for the duplicate effort!
- 🇺🇸United States jcandan
Okay. There is quite a bit going on here.
- The original issue summary steps to reproduce make no mention of content moderation.
- It turns out that he did fix the original issue as stated in #6.
- Others jumped in and suggested it was content moderation where it failed, which is true after #6 was merged.
- From thence, many have put forward several independent efforts to address this issue.
- Including my own duplicate issue noted above.
I will mark my issue as a duplicate, as well as 💬 Paragraphs integration not working with workflow moderation Active .
I will port my work from 🐛 Fix Paragraphs support with Content Moderation Active so I can give folks here credit for their contributions.Once I get that ported over to a new MR associated with a fork here, please conduct reviews to ensure this addresses the issue well.
- 🇺🇸United States jcandan
Original summary
Problem
The logic that has been added to the RequireOnPublishValidator for the paragraph entities is not correct. Paragraph can't get the parent entity since it doesn't exist when a user creates a new node. Also, even on the node edit, when a node exists and the paragraph can extract the parent entity, it will get the original node rather than a new one and therefore it will contain the old 'Published' value.
- Create a paragraph type with the 'Require on publish' option enabled.
- Add this paragraph to a node.
- Create a new entity with an unchecked 'Publish' option.
- Observe that 'Require on publish' validator returns an error for the required paragraph fields.
Proposed resolution
- Since at the moment, when a user submits the form validation constraint doesn't have the fresh node, we need or extract the published value from the POST data
- Skip the validation for the paragraph entities and when constraint function goes through all entity fields, find paragraphs fields, get paragraph entity and then go through all paragraph fields as well.
- Merge request !27Issue #3178100 by jcandan: Fix Paragraphs support with Content Moderation → (Open) created by jcandan