Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I activate Simple sitemap for a content type and do a drush config-export
and drush config-import
, the settings are not transfered, and Simple sitemap not enabled for the content type.
To recreate: Go to Content types > Article > Menu settings > Simple XML sitemapExcluded from sitemap
and enable and save:
Do not index entities of this type
x Index entities of this type
Content of simple_sitemap.settings.yml:
custom:
-
path: /
priority: !!float 1
entity_types:
node:
article:
index: 1
priority: 0.5
taxonomy_term: { }
menu_link_content: { }
settings:
max_links: 2000
cron_generate: true
remove_duplicates: true
skip_untranslated: false
batch_process_limit: 1500
_core:
default_config_hash: Gzm-Hm6hFi622JTbULwDXMxPi33rj_mF0pi1ggq6sFQ
On import it says:
simple_sitemap.settings create
Yet, if I go to Content types > Article > Menu settings > Simple XML sitemapExcluded from sitemap
it says:
x Do not index entities of this type
Index entities of this type
Comments
Comment #2
ressa CreditAttribution: ressa at Ardea commentedI've narrowed the problem down to this bit:
priority: !!float 1
.If I change it to
priority: 1.0
and do a Single item import, it works fine.So the problem is that the root path priority value isn't exported correctly.
Comment #4
gbyte CreditAttribution: gbyte as a volunteer and commentedThanks, this is fixed now. Please update the
1.0
priority setting by re-saving the bundle edit or bundle instance edit page in question.Comment #5
ressa CreditAttribution: ressa at Ardea commentedI just tested the latest dev-release and the problem is still there - the configuration is not imported. Content of simple_sitemap.bundle_settings.node.article.yml
But it still says " Do not index entities of this type" ...
Comment #6
gbyte CreditAttribution: gbyte as a volunteer and commentedI have just tested it by indexing the bundle, exporting the config to sync, unindexing the bundle and chaning the priority and importing config from sync. Here everything is working as expected... Can you try on a fresh install? Also please do not forget to revisit the URL, as purely refreshing the page may not change form fields.
Comment #7
ressa CreditAttribution: ressa at Ardea commentedYou're right, it does seem to work. I just tested it over at https://simplytest.me/ - configured the article content type for Simple Sitemap, did a full export, un-installed the module, imported the full configuration and the article content type was activated for indexing. So that's great. But for some reason, it doesn't seem to get picked up in my workflow... I will try to dig a bit more, and see if I can figure out what's going on.
Comment #8
ressa CreditAttribution: ressa at Ardea commentedTheory: Could it be because the content type is deleted and re-created during a complete config-import, and the settings are thereby lost in the process? What if we try setting the weight of the Simple XML sitemap to something "heavy", so that it is imported as late as possible in the config-import process, if that's possible?
Comment #9
ressa CreditAttribution: ressa at Ardea commentedI just did a full
config-export
->config-import
on a fresh install, and then randrush config-import deploy --preview=diff
an extra time (I define the "deploy" folder in my settings.php):After running
config-import
a second time Simple Sitemap is now enabled for the Article content type, so changing the order of config-import's would probably solve this, if it is possible.Comment #10
gbyte CreditAttribution: gbyte as a volunteer and commentedThat's strange, the sitemap's config should be imported regardless of whether the article type exists or not and should work as soon as the article type exists. You have to make sure to also import simple_sitemap.settings.yml.
If you find a solution to this, please share, until then I will set this to 'support request', as it doesn't strike me as a bug.
Comment #11
ressa CreditAttribution: ressa at Ardea commentedEverything, including simple_sitemap.settings.yml, is imported during the first config-import - only simple_sitemap.bundle_settings.node.article.yml is left out. It is really odd ...
Comment #12
gbyte CreditAttribution: gbyte as a volunteer and commented@ressa
Can you check if perhaps exporting/reimporting the config changes
'0.1'
back to!!float
? Apparently this happened at least once here. Thanks.Comment #13
ressa CreditAttribution: ressa at Ardea commentedThanks for remembering this issue @gbyte.co :-)
These are the three Simple XML sitemap files I have in my config-import folder, together with 462 other files. Like I wrote above, Simple XML sitemap configuration is only imported if I import twice...
simple_sitemap.bundle_settings.node.article.yml
simple_sitemap.custom.yml
simple_sitemap.settings.yml
Comment #14
gbyte CreditAttribution: gbyte as a volunteer and commentedIt's been over a year and many releases of this module. If this is still a thing, feel free to reopen.