Closed (fixed)
Project:
Domain
Version:
5.x-1.0rc3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jan 2008 at 20:18 UTC
Updated:
26 Jan 2008 at 17:21 UTC
Jump to comment: Most recent file
agentrickard already posted a fix that apparently got only partially committed. What's missing in current RC3 is the definition of the variable $script, which is what this patch adds.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | domain.module.patch | 1.96 KB | smk-ka |
| #2 | domain.module.patch | 1.96 KB | smk-ka |
| domain.module.patch | 463 bytes | smk-ka |
Comments
Comment #1
agentrickardOops! Thanks.
Comment #2
smk-ka commentedHm... this function, domain_grant_all(), actually needs some more love.
First: if variable_get('domain_cron_rule', 1) returns a non-null value, we're leaving the big if-elseif-else construct, which means the paths will never been checked. Therefore we have to do the next check as long as $grant is still set to FALSE.
Second, I've removed that obscure $grant['set'] variable, which is a possible cause for this bug report (which I have also observed): half of the function assigns a boolean value to the static variable, whereas the other half assigns to (and expects it to be) an array with only one key, 'set'.
Third, some non-working code has been fixed:
$page_match || preg_match($regexp, $_GET['q']);which should actually be assigned to $page_match.Fourth, I've exchanged the comparison of path alias and original path, to make the call to drupal_get_path_alias() only when the previous check didn't yield a positive result (ie. a performance optimization).
Comment #3
agentrickardNice. A bug report and some code optimization. Will test.
The $grant['set'] piece came in when it appeared that the
static $grantcheck was not being recognized in the code. The isset() function seems to work better when testing arrays.Have you tested this when adding new paths into the 'Special Page Requests' variable? Try adding a path like "blog/*"
Comment #4
agentrickardI can't re-roll the patch right now, but there is an error in this line:
Extra ) causes WSOD.
Comment #5
smk-ka commentedI have tested it with a node (node/1) and its path alias (article-1). When adding node/* to the Special Pages, some debugging code showed me the first preg_match() immediately returning a non-zero value when trying to access the node. When adding article* instead, it's the second preg_match() that, after fetching the url alias, yields a positive result.
Comment #6
smk-ka commentedUh, yes, I had noticed it and uploaded an edited patch shortly after submitting it... reuploading seems to be safer.
Comment #7
agentrickardConfirmed that this patch does fix the error.
The domain_grant_all() function was getting caught in a recursive loop and, essentially, passing TRUE.
Comment #8
agentrickardCommitted to HEAD. Thank you very much.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.