- 🇦🇺Australia Sam152
Not a bad feature, but I'd imagine this either belongs in a sub module or another contrib so folks have the option of using this or not?
- last update
about 1 year ago Composer require failure - 🇮🇳India ashraf.hussain Bangalore
The above patch works perfectly to stop referenced nodes from being unpublished. We also need the ability to stop a referenced term from being unpublished. Uploading the patch for the same.
- last update
12 months ago Composer require failure - 🇮🇳India ashraf.hussain Bangalore
The above patch(entity_reference_integrity-n3247080-6.patch) works perfectly to stop referenced nodes from being unpublished. We also need 1. The ability to stop a referenced term from being unpublished. Uploading the patch for the same.
2. When we try to delete or unpublish a particular node then on error message, user should get an hyperlink of node where that is referring instead of a plain text like "Node Title -> Paragraph Name" (e.g. "Winter 2022 > Suggested events"). - last update
12 months ago Composer require failure - 🇮🇳India ashraf.hussain Bangalore
The above patch(entity_reference_integrity-n3247080-6.patch) works perfectly to stop referenced nodes from being unpublished.
We also need
1. The ability to stop a referenced term from being unpublished.
2. Add a check box in admin setting form to show node edit link instead of node link in error message.
3. If the checkbox in point 2 is selected in admin settings form, when we try to delete or unpublish a particular node then on error message, user should get node edit link instead of node link or a plain text like "Node Title -> Paragraph Name" (e.g. "Winter 2022 > Suggested events").
Uploading the new patch for the same. - last update
12 months ago Composer require failure - 🇮🇳India ashraf.hussain Bangalore
Modified Patch #11 to fix "Call to undefined method "getParentEntity()" error.
- 🇮🇳India vikramsaini1609
Adding following functionality to this patch entity_reference_integrity-n3247080-12.patch →
- If published field is disabled from Manage form display, it shows the entity reference error on updating any entity(Taxonomy/node/media).
- 🇮🇳India ashraf.hussain Bangalore
Adding following functionality to entity_reference_integrity-n3247080-13.patch →
- Add a check in code to show node edit link (if enabled in settings form) only for Node and Paragraph entities. (Refer to point 2 and 3 in comment #11 ✨ Option to stop content from being unpublished Needs review
- 🇮🇳India ashraf.hussain Bangalore
Modified Patch #15 → to show taxonomy term edit links also.
- 🇸🇰Slovakia tomas.teicher
#16 patch works OK, but it is checking integrity only on entity edit forms.
I have added some functionality to cover integrity checking, when unpublishing is executing by two other ways:
- by Drupal Action (i.e. when content is unpublishing by Views bulk operation)
- When content is unpublishing programatically (I have added check by hook_entity_presave() implementation.
I have added some new classes to the patch. The code can be further simplified but it can be solved by some another issue after some discussion, how to achieve it). I think, the code for checking integrity should be in separated class and not in action plugins. but it can be solved in some another issue.
- 🇨🇴Colombia ibustos Bogotá D.C.
Enhanced the code a bit since it did not work on my use case as my content entity has a different "published" key other than "status".
- 🇨🇴Colombia ibustos Bogotá D.C.
Please disregard my patch above as it doesn't apply cleanly. I basically enhanced the code a bit since it did not work on my use case as my content entity has a different "published" key other than "status".
- 🇨🇴Colombia ibustos Bogotá D.C.
Adding validation before invoking
hasField
on$entity
duringentityPresave()
. - 🇨🇴Colombia ibustos Bogotá D.C.
Noticed the patch was not taking into account articles that may have been previously unpublished. Adding a small increment to address this.