Include images settings on custom links not working

Created on 12 October 2024, about 1 month ago

Problem/Motivation

The Include images settings on Custom Links is not working.
I have a node that I use as homepage, and the sitemap is listing this node and the "/" links. To avoid duplicated links to the homepage, I removed the /node/1 link from the sitemap (ref: https://www.drupal.org/project/simple_sitemap/issues/3042440#comment-141... Add an option to ignore the homepage twin link in the sitemap.xml Closed: works as designed )

The problem is that the node/1 had a few images, and those images are not appearing on the sitemap entry of the homepage even with the IncludeImages setting.

Steps to reproduce

Create a node with images and promote it to front_page
Check the "Include images" settings on /admin/config/search/simplesitemap/custom
Generate the sitemap
On the sitemap, we'll have /node/1 with the images, but the homepage ("/" link), won't have any images.

Proposed resolution

The includeImages property is null during the generation process(ref), even though it was declared on getDataSets().
As this property is only being used during the generation process we could set it inside the processDataSet() method.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇧🇷Brazil hmendes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024