I've defined a header with some static HTML with hrefs to nodes in my Views-page.
This Views-page is shared between multiple domains.
And I am finding that the Views-page is cached against the first domain that hits the page.
So the page rendered by the Views has DomainA/node/123 when a user from Domain A hits the page first.
And DomainB/node/123 when a user from Domain B hits the page first.
This is causing an Access Denied when a user is restricted from a domain.

I'm using Drupal 6.10 with Views 2 and Domain Access 6.x-2.0-rc6

Comments

jyamada’s picture

Just wanted to add. If I choose the input format as "Php code", it renders without using absolute URLs and bypasses this issue.

nonsie’s picture

Status: Active » Postponed (maintainer needs more info)

Could you please explain your setup? You note that you've set up a header, are you referring to Views header or region header? Do you have caching turned on for Drupal and/or Views? Are you using any modules that alter cache?

jyamada’s picture

Here goes:

0. install domain access, views, pathauto, ..
1. create a vew with a few standard fields
2. create a page in that view
3. give it a static html header
4. enter some static html as so foobar
choose display even when no content
5. save
6. create two domains A, B
7. create two users, user A accesses domain A, and repeat for B
8. log in as user A, connect to the view page (record the ahref)
9. log in as user B, connect to the view page (record the ahref)

the href in 9 should point to domain A assuming my case here is correct

agentrickard’s picture

What does step 4 mean? I can't follow this.

The display for different users doesn't matter, unless you are using Domain Strict, so I don't undertand steps 7-9 either.

Are you using Domain Strict? That might account for the issue.

The normal Drupal page cache saves the entire URL string, so this usually is not a problem. But I can see how Domain Strict might make it so.

nonsie’s picture

The html link code you added to the header has no domain in it (e.g. it's relative link) so clicking on it will take you to node/2 on whatever domain you are viewing the Views page from. If you want it to be absolute, make the link absolute.

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
jmunning’s picture

I am having the same problem in Drupal 5. I have two domains set up like so:

example.com
sitetwo.example.com

On example.com I have a view with the url "home" like so:
example.com/index.php?q=home

This view doesn't exist on sitetwo.example.com:
sitetwo.example.com/index.php?q=home

If I clear the cache and go to the second site first I get a "Page not found" which is then cached and used as the view for:
example.com/index.php?q=home

urlaub’s picture

Version: 6.x-2.0-rc6 » 7.x-3.x-dev
Component: - Domain Views » Code
Status: Closed (fixed) » Active

I am having the same problem in Drupal 7.11. (dev)
I have 10 domains set up like:

Main domain: 178.278.157.xxx
example.com
otherexample.com
different.example.org
...

The Main domain is currently an IP # until we're in live mode, maybe this is related to the problem?
Most of the other domains are currently in maintenance mode, but they all have a unique maintenance mode message.

If I clear the cache and go to one of the sites I get the correct maintenance mode message of this domain - which is then "kind of" cached and used for all pages, even for the ones which are not currently in maintenance mode?

In addition anonymous user can get randomly this "cached" maintenance mode site, even on pages within the main domain (currently IP)?

agentrickard’s picture

Status: Active » Closed (fixed)

This is not "the same problem.". Please open a proper issue.