Needs work
Project:
XML sitemap
Version:
7.x-2.x-dev
Component:
xmlsitemap_node.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Oct 2015 at 17:58 UTC
Updated:
14 Jan 2019 at 02:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
erichomanchuk commentedComment #4
erichomanchuk commentedSo Ive needed to make a few more changes to get this to work with deploy module. So basically the patch adds in a xmlsitemap_node_create_link on node load. Then I'm able to export the xmlsitemap data using services.
When I pushed using deploy If the nid didn't exactly match then the update or create didn't work. So I moved the nid for the xmlsitemap data out of the array merge and added it to similar volatile variables. As the loc was set correct but nid wrong. This fixed my issue as the nid's being the same are not guaranteed when using deploy.
The last issue I couldn't really figure out is the testing failed for the access check on line 70 of the node tests XMLSitemapNodeFunctionalTest->testNodeSettings(). When the node had its status set to FALSE the xmlsitemap_link_load was still reading access true when it should be false. In the end I just commented out using the cache of the user rights which fixed the problem.
Comment #5
erichomanchuk commentedComment #6
erichomanchuk commentedJust fixing accidentally changing status from TRUE to 1 in the test.
Comment #7
kasey_mk commentedThanks, this was very helpful. It let me add the following to a hook_node_presave function, to exclude nodes with a particular field value:
Comment #8
chris matthews commentedThe 3 year old patch in #6 to xmlsitemap_node.module does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.