Problem/Motivation

Please credit larowlan, thoward216, wim leers, edwardsay, shitalb per #3550334: [update path] [upstream] Text formatted with CKEditor within Canvas gets double escaped when output which uncovered this

Respect allowed_formats settings in \Drupal\text\Plugin\Field\FieldType\TextItemBase::applyDefaultValue

Steps to reproduce

TBD

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

Introduced terminology

TBD

API changes

None.

Data model changes

None.

Release notes snippet

None.

Issue fork drupal-3556506

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Issue summary: View changes
wim leers’s picture

Issue tags: +Experience Builder
avpaderno’s picture

Title: Respect `allowed_formats` settings in \Drupal\text\Plugin\Field\FieldType\TextItemBase::applyDefaultValue » Respect allowed_formats settings in \Drupal\text\Plugin\Field\FieldType\TextItemBase::applyDefaultValue

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

smustgrave made their first commit to this issue’s fork.

penyaskito’s picture

Status: Active » Reviewed & tested by the community
smustgrave’s picture

Status: Reviewed & tested by the community » Needs work

Still need to look into test failures, may have to put a check in if the service is missinh

smustgrave’s picture

Status: Needs work » Needs review

Okay now hopefully should be good. Wrapped everything in a hasService check. Thought about updating the tests but could be real scenario that someone doesn't have filter installed I suppose.

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community
godotislate’s picture

Status: Reviewed & tested by the community » Needs work

Didn't get any other committer opinions in Slack, so let's just adjust the Kernel tests to include filter and remove the wrapping conditiona. It's not expected for text to be installed without filter anyway, since the latter is a dependency of the former.

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Since this was just fixing tests hope ok to mark mysel

  • godotislate committed f2eae5f2 on 11.x
    fix: #3556506 Respect allowed_formats settings in \Drupal\text\Plugin\...

  • godotislate committed e09f5a64 on main
    fix: #3556506 Respect allowed_formats settings in \Drupal\text\Plugin\...
godotislate’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed e09f5a6 to main and f2eae5f to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

smustgrave’s picture

Fingers crossed this doesn't break 11.x

  • catch committed 69ccf4bb on 11.x
    Revert "fix: #3556506 Respect allowed_formats settings in \Drupal\text\...
catch’s picture

Status: Fixed » Patch (to be ported)

This did break 11.x - lots of kernel test failures (I think), reverting to confirm it's definitely the problem.

smustgrave’s picture

As I discovered doing the text_with_summary move a lot of migrate tests never declared filter. Hopefully when that lands this will be easy to see what's left.

smustgrave’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Woo! Think the text_with_summary ticket knocked them all out as I'm getting a green pipeline for 11.x

  • godotislate committed 02522d68 on 11.x
    fix: #3556506 Respect allowed_formats settings in \Drupal\text\Plugin\...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

Committed 02522d6 and pushed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.