Invalid sitemap name in code

Created on 6 December 2017, about 7 years ago
Updated 7 May 2023, over 1 year ago

$is_exist = file_exists(\Drupal::service('file_system')->realpath(file_default_scheme() . "://") . '/google_image_sitemap/sitemap_' . $gis_obj->node_type . '.xml');

in this code you are checking the sitemap fiel with sitemap_' . $gis_obj->node_type . '.xml

But when you generate the sitemap file with different name.

if ($result->node_type != 'all') {
        $query->condition('nfd.type', $result->node_type);
        $filename = 'google_image_sitemap_' . $result->node_type . '.xml';
      }
🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇮🇳India jeetendrakumar

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024