Skip to content

Elementor background images on Elementor templates are not loaded when Yoast SEO is active #19753

@josevarghese

Description

@josevarghese

Reporter: @rmarcano
Moved from Jira: https://yoast.atlassian.net/browse/IM-2106

Description
On Elementor template pages, with a background image, the background image is not loaded.

This can cause issues when the templates are used in the Maintenance Mode in Elementor.

Looking into the issue, I noticed that the class in the <body> tag that actually loads the background image is removed when Yoast SEO is active.

On my test site for example, this is the <body> tag without Yoast active:

<body class="elementor_library-template elementor_library-template-elementor_canvas single single-elementor_library postid-18483 wp-embed-responsive elementor-default elementor-template-canvas elementor-kit-4164 elementor-page elementor-page-18483 elementor-maintenance-mode">

Once Yoast SEO is activated:

<body class="elementor_library-template elementor_library-template-elementor_canvas single single-elementor_library postid-18483 wp-embed-responsive elementor-default elementor-template-canvas elementor-kit-4164 elementor-maintenance-mode">

To Reproduce
Steps To Reproduce

  1. Install Yoast SEO and Elementor on a new site

  2. Go to Templates > Saved Templates and add a new one.

  3. Edit the new template page with Elementor and add a background image to the page.

  4. In the General settings of the page, select Page Layout : Elementor Canvas

  5. Go to Elementor > Tools > Maintenance Mode. Select:
    Choose Mode : Maintenance
    Who Can Access : Logged in
    Choose Template : The template you created.

  6. Visit the frontpage. The frontpage should load but without the background image.

Expected Results
I expected the background image to be loaded.

Actual Results
The image did not load.

Impact
This renders Elementor's Maintenance mode useless if the user is adding a background image to the page.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions