craftcms / craftcms/ckeditor

Calling `.render()` throws an error

Open
#343 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
47
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Description

When using the field migration utility any instances where {{ field.render() }} was used for the previous Matrix field will cause an error.

It would be helpful for migrating from Matrix to the CKEditor field if the use of render was code compatible between the two fields. Even better would be if {{ field.eagerly().render() }} was also code compatible.

Steps to reproduce
  1. Call unknown function render() on craft\ckeditor\data\FieldData::class
Additional info
  • Craft version: 5.5.6.1
  • PHP version: 8.3.14
  • Database driver & version: MySQL 8.0.36
  • Plugins & versions: CKEditor 4.4.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the craft\ckeditor\data\FieldData::class entry point named in the reproduction and compare how Matrix field data handles render() and eagerly(). Confirm the failure with the provided Twig calls. Done means both {{ field.render() }} and {{ field.eagerly().render() }} work compatibly for CKEditor field data.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.