Integrate with Domain Access
szy - July 29, 2009 - 07:52
| Project: | XML sitemap |
| Version: | 6.x-2.x-dev |
| Component: | xmlsitemap.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Hi there,
Have you found the way for generating proper sitemaps
with XML Sitemap and Domain Access for 6th Drupal?
I can see, that:
* Node urls in a sitemap do not contain a proper domain,
only the base one, or the url cron.php was running from.
* A single node shows up on every domain's sitemap,
regardless its DA settings.
Important: there is no required db_rewrite_sql in code
of XML-S. module.
Or maybe there is any other working solution for Domain
Access and XML Sitemap in Drupal 6?
Tia,
Szy.
PS. This is issue for both 6.x-2.x and 6.x-1.x versions.

#1
What about a hook that would allow you to alter the link. Based on your comment I assume that Domain Access allows for running cron.php on only one domain and thus the problem becomes how to replace the base_url generated in the report for each different domain. A hook_xmlsitemap_link_alter() could allow you to replace the $base_url value with an '@base_url' token string on write and then replace the '@base_url' token string with the new value of $base_url on display of the sitemap.
This sounds a bit cumbersome and may be slower than you desire it to be but is about the only option I can think of where you only execute cron.php on one domain. This is more a feature request that a support request in that you are asking for coordinated work.
#2
We're already using custom_url_rewrite_outbound() in Domain Access, so I wonder if that logic is getting applied. (I also wonder if node access rules are being applied).
DA's cron hook also fires an internal hook_domaincron() that should allow for cron-per-domain functionality.
I think we may also have to account for a site map per domain, and my understanding is that XML SiteMap only generates one file, which doesn't work in the DA use-case.
This is one of those features/issue I just haven't had time for.
#3
Module weight issue perhaps?
Maybe rewrite the global xmlsitemap for each domain to its own file manipulating the base_url value. Does DA control the files variable so that each site has its own directory appended? Something like files/[domain_id]/xmlsitemap/ may help.
We all have to set priorities and more recent issues take precedence over previous ones. Don't feel badly.
#4
Re #1: We can't use xmlsitemap_link_alter() because that's run before data is inserted/updated into the database. And we don't store the full path to the link, only the relative part (e.g. node/1).
We don't use db_rewrite_sql() because we don't generate the data when we also generate the sitemap files. We populate the {xmlsitemap} data during cron and instead of using db_rewrite_sql() we use node_access() on each individual node.
I don't easily see a solution right away.
#5
Hm.
We can control the files variable for individual actions while generating the files (I use this in Domain Theme). Early tests on globally changing the files directory for all file handling failed.
In any event, I see a bridge module handling this.
#6
I think the code for the integration between XML sitemap, and Domain access should rather be in a third-party module, not a module included with XML sitemap. The number of users using both the modules should be very limited.
#7
FYI This would not be very high on my priority list since I don't use the Domain Access module. This would need someone to step up and contribute it. Marking as postponed for now.
#8
Subscribing.
#9
#10
FYI there's also a new hook now called hook_xmlsitemap_query_alter() that can be used to alter what data is selected for the sitemap. It might be of use somehow for this purpose. It came in very handy writing a sub-module to integrate the content selection of i18n w/ xmlsitemap.
#11
But that would still only output one file, right?
Do we have a setting or variable that controls the name of the output file?
#12
Hmm, yeah we'd need something more for Domain access. I'm going to stop trying to figure this out right now since my head is exploding. :)
#13
It's one of those things I could figure out, given 4 hours. Maybe in Paris....
#14
Let me know what would need to be altered to make domain access integration work.
#15
I suspect you need an argument for domain handling, similar to the argument for for $language in the _chunk() functions.
#16
Subscribing. Would be great to have this working!
#17
Subs. +1
#18
Subscribing
#19
subscribing
#20
This is quite essential, evoking this again.
#21
@chawl And what are you doing to help the process?
#22
Yes, I am trying to figure out the code, but this seems quite beyond my skills. Then I tried to check what vox populi might say.
#23
This is kind of the one big issue that would be holding me back from a 2.0 release because I know that getting the module to support Domain access is going to require a change in the APIs. I'd like to avoid doing that post-2.0 but if I'm nearing an official 2.0 release I don't want to postpone it.
#24
This bridge just became a requirement for a project of mine so sub as well.
#25
Well, I'll try toi look again this weekend, but my initial research suggests that the _chunk functions need an additional argument. Maybe a $context array that allows for the creation and loading of different sitemaps based on conditions.
Perhaps a refactor of the existing $language code to be abstracted as a $context might be the first step?
#26
Please don't get me hurrying you up, but... is there any chance
for XML Sitemap and Domain Access working together? :]
Big thanks for your work, guys,
Szy.
#27
subscribing
#28
Hi
I have two domains pointing to one site chiprv.org and chiprv.dev.triocircle.com.
The problem is that I have installed xmlsitemap throught chiprv.org and I am getting error when navigating to chiprv.org/sitemap.xml but then it is working for chiprv.dev.triocircle.com/sitemap.xml. I am unable to figure out the problem.
Thanks
#29
@ansari.wajid: You fail to understand what we've been trying to tell you. I'm sick of correcting your "noise" in these issues and I hate using all caps. But maybe you'll read it this time:
STOP POSTING THE SAME COMMENT IN ISSUES THAT ARE NOT RELATED TO YOU PROBLEM.
STOP POSTING TO CLOSED ISSUES UNLESS IT WAS CLOSED RECENTLY AND YOU HAVE READ THE ENTIRE THREAD AND ARE HAVING THE EXACT SAME PROBLEM
OPEN A NEW ISSUE IF THERE ISN'T AN EXISTING, RELATED, OPEN ISSUE THAT IS ABOUT YOUR SAME PROBLEM OR IF YOU ARE JUST UNSURE.
You have not specified you are using Domain Access, which is what this report is about.
#30
I could hear you shouting half way around the globe... although Wajid is located a bit further away I would say he should get the message now ;)
On topic: I gave integration a shot but mainly due to lack of time and knowledge I failed horribly :(
Cheers