Custom elements are also rendering in node/add admin page and that causes paragraph, media and other inline entities to not display the preview properly in backend.

Comments

pagach created an issue. See original summary.

pagach’s picture

StatusFileSize
new2.08 KB

The patch prevents usage of CE in admin pages.

fago’s picture

Status: Active » Needs work

yes, I noticed this as well. However, I'm not sure whether we should check the admin routes vs. the admin themes.

I guess it makes sense that CE follows the theme used and since "Use the administration theme when editing or creating content" checkbox is applied. Is this the right check that Drupal uses to determine whether to switch to the admin theme?

Next, I think this patch should go into ce everywhere only - since otherwise CE is only enabled for specific view modes anyway. custom_elements_* view modes should always be rendered as such imo, as well in the admin theme.

pagach’s picture

StatusFileSize
new1.41 KB

I think isAdminRoute is correct way to check this since it returns true for editing/creating forms only if "Use the administration theme when editing or creating content" checkbox is checked.

Agreed that custom_elements_* view modes should always be rendered as such. Disabled CE only in ce everywhere.

fago’s picture

Status: Needs work » Fixed

thx, that makes. Patch looks and is working as advertised. Thus, merged it.

  • fago committed 4197857 on 8.x-2.x authored by pagach
    Issue #3061244 by pagach: Custom elements used in node/add page
    

Status: Fixed » Closed (fixed)

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