Closed (fixed)
Project:
Sites
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
22 Aug 2012 at 13:15 UTC
Updated:
10 Dec 2012 at 10:30 UTC
Jump to comment: Most recent file
I use "domain" as my purl processor for the sites module. When I create a node for a sites-site (hereafter named subsite), I can only view it on the main site. On the subsite I get "access denied".
After some research I found that the access check (sites_sites_access) happens before purl_init, so that the site context is not set yet for the check, which results in an "access denied".
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | sites-access_denied_on_nodes-1744272-0.patch | 499 bytes | koenvw |
Comments
Comment #1
koenvw commentedThat's right ducktape, in _drupal_bootstrap_full() the call to menu_set_custom_theme() results in a hook_access() being triggered. hook_init only happens after that:
In my case I fixed it by calling purl_init() explicitly in sites_sites_access() so we are always sure purl is initialized. purl_init() has a check so it only runs once during the request life time.
See patch attached.
Comment #2
takki commentedReviewed, tested and committed to 7.x-1.0. Thanks
Comment #3
guypaddock commentedRe-opening -- this definitely isn't showing up on the 7.x-1.x branch. Perhaps it's on 2.x?
Comment #4
takki commentedYou are right, seems like I didn't add it to the release. Commited the patch now to 7.x-1.x-dev and 7.x-2.x-dev.