Posted by Dave Reid on February 8, 2010 at 4:16pm
6 followers
Jump to:
| Project: | XML sitemap |
| Version: | 7.x-2.x-dev |
| Component: | xmlsitemap_user.module |
| Category: | bug report |
| Priority: | critical |
| Assigned: | earnie |
| Status: | postponed (maintainer needs more info) |
| Issue tags: | Release blocker |
Issue Summary
Ugh, there's lots of crappy stuff going on about when to save the XML sitemap data from the user account form and when to save it because the $account object changes. I'm looking into this right now, but currently the per-user settings are not working on 7.x-2.x or 6.x-2.x.
Comments
#1
Adding release blocker tag.
#2
I don't know about 7 but for 6 it is pretty darn ugly. When the 'form' is loaded set a static cache of the account removing the form_build_id from the object, unserialize the object->$data and remove the form_build_id element from the array. On the 'after_update' move the $account variable to another variable in order to do the dance with form_build_id so that you can compare the before image and after image copies to know if you need an update. You have to remove the form_build_id because the values are different in the before and after.
HTH
#3
#4
I think #786484: Use a 'link update' queue for delayed link changes is what we'll need to fix this... that way we get the fully changed user account variable at the end of the page request or during cron.
#5
#6
I've added a note to Known Issues that will need removed once this is corrected.
#7
Dave, I've been trying to determine why xmlsitemap_user module isn't saving the changes to include or exclude the user in the sitemap. I see that xmlsitemap_process_form_link_options() is added to the #submit array and it is called, however that function doesn't do the save. Instead it is waiting for xmlsitemap_user_user_update() hook implementation to do the save but the $account variable doesn't contain the changed value and neither does the $edit variable.
Is there a reason not to save the data on submit? What purpose is accomplished in waiting for the hook_*_update() function? I realize if we refactor this piece that we must do so for all entities.