Closed (fixed)
Project:
Simple XML sitemap
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
4 May 2017 at 04:07 UTC
Updated:
9 Sep 2017 at 20:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vytch commentedComment #3
vytch commentedComment #4
vytch commentedFixing the notice message when the changefreq is not yet defined
Comment #5
nikunjkotechaAdding patch with all required changes to add changefreq element.
Comment #6
vytch commentedIf a node has been already treated as a menu_link_content, then it does not get the data set from the node edit page.
Comment #7
vytch commentedFixing issue with notice error.
Comment #8
gbyteThanks for your input guys. @vytch Can you incorporate your change into #5? It seems that one is more complete. I am going to review it in a few moments.
Comment #9
gbyte@nikunjkotecha thanks for yout patch. I have found a couple of issues that need fixing before we commit.
simple_sitemap_entity_overridesand configuration storage ofsimple_sitemap.bundle_settings.* and simple_sitemap.custom.Notice: Undefined index: changefreq in Drupal\simple_sitemap\Simplesitemap->setEntityInstanceSettings() (line 418 of Simplesitemap.php).when trying to override entity instance.Custom linksafter applying the patch, the paths are formatted incorrectly in the textbox. There must be an (optional) way of adding changefreq for custom links and the value added needs to be validated.+ ? $custom_link['path'] . ' ' . $this->formHelper->formatPriority($custom_link['changefreq']). There should be a formatChangefreq function I believe.Another question is, what do you think about implementing automatic changefreq values for entities (as we have last viewed and created data) as xmlsitemap does?
Thanks!
Comment #10
rliAccording to the comment in #9, re-rolled the patch in #5 to fix following:
simple_sitemap_entity_overridesto fix the PHP warnings. The config storage is already changed in the patch in #5.Notice: Undefined index: changefreq in Drupal\simple_sitemap\Simplesitemap->setEntityInstanceSettings() (line 418 of Simplesitemap.php).is gone after altered the db.Have not got time to think about the automatic changefreq generation yet. The options allows user to control the value per content type is good enough for our project at the moment.
Comment #11
rliComment #14
rliSeems no need to add column in db as the settings are stored as serialised array.
Comment #15
rliAdded update hook to alter all existing data.
Comment #16
rliRerolled patch to alter all existing settings.
Comment #18
gbyteThanks for your patches guys, couldn't use them much however. I've committed all changes to dev, please take a look for me.