Problem/Motivation

If entity uses render elements that are lazy rendered (using drupal placeholders) entity print renderer ignores them.

Steps to reproduce

Try to print the page that has comments form. Or use Advanced insert view module to add view to CKEditor field. There is a related issue https://www.drupal.org/project/insert_view_adv/issues/3219943

Proposed resolution

In src/Renderer/RendererBase.php class in generateHtml method use $is_root_call variable as TRUE when rendering entities.

Remaining tasks

Create MR

User interface changes

No changes

API changes

No changes

Data model changes

No changes

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

a.dmitriiev created an issue. See original summary.

a.dmitriiev’s picture

Status: Active » Needs review

Are there any consequences using $is_root_call = TRUE when doing render? I checked the PDF and it was ok, also no errors, but maybe there are other cases?

a.dmitriiev’s picture

Issue summary: View changes
a.dmitriiev’s picture

All tests passed, so I guess this doesn't bring any problems.

mylies’s picture

StatusFileSize
new569 bytes

Thank you for the patch, a.dmitriiev!

I did the patch-file according to fork that made a.dmitriiev, just to be able to point it while composer-based patching

UPD: oops, it seems there no need the patch anymore - composer will recognize this way too https://git.drupalcode.org/project/entity_print/-/merge_requests/5.patch

kleiton_rodrigues’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new38.95 KB

Patch applied successfully
looks good to me
moving to RTBC

3220385

  • larowlan committed a225bc4 on 8.x-2.x authored by myLies
    Issue #3220385 by a.dmitriiev, myLies: Allow rendering placeholders
    
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

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