Do not check for user default domain on domain geolocalization and domain user default module menu callback urls
nonsie - November 24, 2008 - 04:16
| Project: | Domain User Default |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
Do not check for user default domain on domain geolocalization and domain user default module menu callback urls, this results in user entered zip code/radius being overwritten by domain defaults.

#1
Patch attached
#2
I've attached a patch that should accomplish the same thing as the patch in #1. It creates a new function for determining internal paths, and then simply returns out of the init hook for internal paths. If this works, I'll apply it to CVS.
#3
Actually I've discovered that you'll need the $user object containing user default domain/geolocalization data even when it is an internal path eg. it should be loaded before check for internal path is performed.
Also when devel module is enabled there's a few more paths to avoid loading user default on; it might be a good idea to make this set a user configurable setting.
#4
In my case I'm directly embedding the static form into content and this patch in #2, this part to precise:
if ($path != $_GET['q']) {
// Match path or alias.
$matches = $matches || drupal_match_path($_GET['q'], $internal_paths);
}
will cause form callback for 'domain_geolocalization_search_static_form' to fail.
#5
I don't quite understand why checking for an alias will cause a form callback to fail...are the internal paths being aliased? And if so, why would /not/ redirecting break the callback?
Is there a simple set of steps to reproduce this?
#6
This has been working for a while but I never followed up on it. Patch from #2 committed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.