Hi there, I have everything set up correctly, as the information block shows I'm in one of my sites whenever I go to the path. However whenever go to a site the front page always gets a "Page Not Found" regardless of if I leave the setting blank or explicitly set a path. I do have a global front page set on the site.

Any help would be greatly appreciated.

Comments

arvinsingla’s picture

Decided to dig through the module and found this section in the function "sites_set_current_site"

// Handle per-site front page overrides
  if(!empty($site->front_page)) {
    if($_GET['q'] == variable_get('site_frontpage','node')) {
      $_GET['q'] = $site->front_page; // This will require module weights to be set appropriately
      // Alternate method: drupal_goto($site->front_page);
    }
  }

I noticed your note for appropriate module weights. What should the module weighting be for this to work properly. I commented out that method and used your alternate method and it worked fine. But if the first method is better I'd rather use that. So I assume my module weighting is wrong.

brynbellomy’s picture

I forget exactly what I meant when I wrote that comment, but I do believe that if Sites comes too late in the order of execution, the $_GET['q'] line will not be recognized soon enough. Sites should probably have an extremely low module weight.

nigelcunningham’s picture

I found that if I use an alias rather than node/ (default module weight), I get that problem. I haven't tried adjusting the weight yet.

brynbellomy’s picture

Yeah, I think I need to change the line

$_GET['q'] = $site->front_page;

to

$_GET['q'] = drupal_lookup_path('source', $site->front_page);

... does that sound right to you folks?

mrfelton’s picture

I get a similar problem for some system paths. For example, my site is based around the path prefix /somesite. If I create a view at /somesite/list, then visiting /somesite/list results in a 404. Similarly, if I use the Auto Assign Role module to set up a sign up page at /somesite/join visiting /somesite/join results in a 404.

--
EDIT:
Just to add to that - the problem only happens when the system path contains the path prefix of the subsite. For example:

system path = /join => visiting /join works, and visiting /somesite/join works and the active site context is set.

when system path = /somesite/join => visiting /somesite/join results in a 404, as does /somesite/somesite/join. There seems to be no way to access this path when it's prefix is the same as the site's prefix.

hydra’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

As this module has not been maintained for some time, I am closing this ticket as “outdated”. A new version of sites which is architecturally and technically unrelated to the Drupal 6 and Drupa 7 versions will be published here soon.
Thank you for your contribution.