Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested Entries not rendering at all on front end #249

Closed
brianrivet-tilt opened this issue Jun 13, 2024 · 6 comments
Closed

Nested Entries not rendering at all on front end #249

brianrivet-tilt opened this issue Jun 13, 2024 · 6 comments
Assignees
Labels

Comments

@brianrivet-tilt
Copy link

Description

I'm not seeing my nested entries rendering on the front end after upgrading to 4.1.0. When I view the html output I see this where the output from my nested entry templates should be:

 

The entry number changes, but it isn't rendering the template code.

Steps to reproduce

  1. Add nested entries
  2. View front end

Additional info

  • Craft version: 5.2.0
  • PHP version: 8.2.13
  • Database driver & version: MySQL 8.0.33
  • Plugins & versions: CKeditor 4.1.0
@i-just
Copy link
Contributor

i-just commented Jun 14, 2024

Hi @brianrivet-tilt, thanks for getting in touch!

Can you please provide a bit more info on this? How are you rendering the content of your CKEditor field? Do you have your partial templates set up? What is it that you see vs what do you expect to see?

@i-just i-just self-assigned this Jun 14, 2024
@brianrivet-tilt
Copy link
Author

brianrivet-tilt commented Jun 14, 2024

Hi Iwona,

I do have my partials set up. I have them in a folder, it isn't in the standard location, but I have the partialTemplatesPath setting set to the correct folder in my general php file. Plus the templates were working prior to my upgrade to Craft 5.2.0 and CKEditor 4.1.0.

As for what I am seeing, when I look at the page in the browser, the content from the CKEditor field itself is rendering (so paragraph text, etc. comes in fine). The nested entries however do not. If I view the page in the inspector, I see these tags where the nested entries should be:

<craft-entry data-entry-id="25">&nbsp;</craft-entry> <craft-entry data-entry-id="88">&nbsp;</craft-entry> <craft-entry data-entry-id="103">&nbsp;</craft-entry> <craft-entry data-entry-id="156">&nbsp;</craft-entry> <craft-entry data-entry-id="171">&nbsp;</craft-entry> <craft-entry data-entry-id="206">&nbsp;</craft-entry>

@i-just
Copy link
Contributor

i-just commented Jun 14, 2024

Thanks for all the details! I’m not able to reproduce that. Would you mind sending your composer.json, composer.lock, database export, and your templates to [email protected] and point out the entry this is happening for, so we can try to reproduce this and dig deeper?

@i-just
Copy link
Contributor

i-just commented Jun 14, 2024

I replied via support.

For posterity, the nested entries weren’t rendering as the content of the entire CKEditor field (both markup and entry chunks) was run through the retconAttr filter, which caused the nested entries not to get rendered as expected.
Iterating through the chunks and applying the retconAttr filter to the markup-type chunks makes the nested entries render as expected. (If desired, the filter can then be applied to the content of the nested entry via its partial template.)

@i-just i-just closed this as completed Jun 14, 2024
@brianrivet-tilt
Copy link
Author

brianrivet-tilt commented Jun 14, 2024 via email

@mmikkel
Copy link

mmikkel commented Jun 14, 2024

...also for posterity, I just tagged Retcon 3.1.1, including a fix for the mentioned behaviour in cases where retconAttr or other Retcon filters are applied to CKEditor fields containing nested entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants