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
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

earnie - July 29, 2009 - 12:59
Category:support request» feature request

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

agentrickard - July 29, 2009 - 14:05

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

earnie - July 29, 2009 - 15:07

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).

Module weight issue perhaps?

DA's cron hook also fires an internal hook_domaincron() that should allow for cron-per-domain functionality.

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.

This is one of those features/issue I just haven't had time for.

We all have to set priorities and more recent issues take precedence over previous ones. Don't feel badly.

#4

Dave Reid - July 29, 2009 - 16:09

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

agentrickard - July 29, 2009 - 17:45

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

kiamlaluno - August 14, 2009 - 20:50
Title:Domain Access and XML Sitemap for 6th Drupal» Domain Access and XML Sitemap for Drupal 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

Dave Reid - August 15, 2009 - 23:33
Status:active» postponed

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

croryx - August 15, 2009 - 23:43

Subscribing.

#9

Dave Reid - August 19, 2009 - 19:20
Title:Domain Access and XML Sitemap for Drupal 6» Integrate with Domain Access

#10

Dave Reid - August 21, 2009 - 15:23

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

agentrickard - August 21, 2009 - 15:48

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

Dave Reid - August 21, 2009 - 15:50

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

agentrickard - August 21, 2009 - 17:06

It's one of those things I could figure out, given 4 hours. Maybe in Paris....

#14

Dave Reid - August 24, 2009 - 01:12

Let me know what would need to be altered to make domain access integration work.

#15

agentrickard - August 24, 2009 - 14:24

I suspect you need an argument for domain handling, similar to the argument for for $language in the _chunk() functions.

#16

BarisW - August 26, 2009 - 12:25

Subscribing. Would be great to have this working!

#17

chawl - August 27, 2009 - 21:28

Subs. +1

#18

hkellecioglu - September 1, 2009 - 21:41

Subscribing

#19

Bartezz - September 15, 2009 - 07:32

subscribing

#20

chawl - September 27, 2009 - 21:23

This is quite essential, evoking this again.

#21

agentrickard - September 28, 2009 - 14:18

@chawl And what are you doing to help the process?

#22

chawl - September 28, 2009 - 16:28

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

Dave Reid - September 28, 2009 - 16:34

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

nonsie - October 1, 2009 - 21:28

This bridge just became a requirement for a project of mine so sub as well.

#25

agentrickard - October 2, 2009 - 01:46
Status:postponed» active

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

szy - November 3, 2009 - 08:52

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

matteoraggi - November 5, 2009 - 22:28

subscribing

#28

ansari.wajid - November 9, 2009 - 12:30

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

Dave Reid - November 9, 2009 - 21:03

@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

Bartezz - November 9, 2009 - 23:08

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

 
 

Drupal is a registered trademark of Dries Buytaert.