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

nonsie - November 24, 2008 - 04:16

Patch attached

AttachmentSize
domain_user_default.module-ignore-module-paths.patch 4.82 KB

#2

jhedstrom - November 25, 2008 - 00:29

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.

AttachmentSize
domain_user_default.module.ignore-module-paths.patch 1.53 KB

#3

nonsie - November 25, 2008 - 02:51

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

nonsie - December 2, 2008 - 19:17
Status:needs review» needs work

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

jhedstrom - December 2, 2008 - 22:26

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

nonsie - June 12, 2009 - 00:45
Status:needs work» fixed

This has been working for a while but I never followed up on it. Patch from #2 committed.

#7

System Message - June 26, 2009 - 00:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.