From update/php http://www.mydomain.com/update.php?op=selection

Click button and it directs to http://www.mydomain.com/:///update.php?op=selection which returns a 404 Page Not Found.

(Notice that the URL contains: /:/// )

If I hit the browser back button Drupal returns:

warning: parse_url(/:///update.php?op=selection) [function.parse-url]: Unable to parse URL in /home/hfcom/public_html/drupal6/sites/all/modules/domain/domain.module on line 973.

If I turn off the Domain module, the update.php performs flawlessly.

CommentFileSizeAuthor
#2 domain_form_alter.patch1.79 KBagentrickard

Comments

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Wow.

What are your domain settings? Is www.mydomain.com the primary domain in your install?

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.79 KB

Try this patch. Apply from the 'domain' directory.

agentrickard’s picture

Might be a better way, as I think the domain init sequence isn't running -- and it may need to.

agentrickard’s picture

Here's why it fails, see the opening of update.php:

/**
 * Global flag to identify update.php run, and so avoid various unwanted
 * operations, such as hook_init() and hook_exit() invokes, css/js preprocessing
 * and translation, and solve some theming issues. This flag is checked on several
 * places in Drupal code (not just update.php).
 */

domain_init() is where we set the paths for url rewrites, which include domain_form_alter().

The changes proposed here should solve this problem: http://drupal.org/node/276303

Critical Tinkerer’s picture

Sorry, Rickard, are you suggesting to apply domain_form_alter.patch from #2 or to mosey over to http://drupal.org/node/276303 and apply domain_alias.patch ?

--
stephen@hardfocus

nirvanajyothi’s picture

i had a similar problem.but it was after updating pathauto module.when i disabled it and run cron again the error was gone.And then i did a reinstall of pathauto and it worked out fine...just addin my bit...it may or may not be the cause in your case.

agentrickard’s picture

@hardfocus

For the quick fix, use the patch above: http://drupal.org/files/issues/domain_form_alter.patch

In the released version, I think the changes in the other issue may solve this problem, which is caused because hook_init() is not invoked by update.php. However, it may be that we need to disable the form_alter() implementation for other forms, in which case this patch is a good idea.

@nirvanajyothi

The pathauto issue does not seem to be related, since we are talking about update.php, not cron.php.

agentrickard’s picture

Status: Needs review » Fixed

The appropriate patch here is to use hook_boot() instead of hook_init(). This change is independent of other issues.

Committed to HEAD.

Critical Tinkerer’s picture

For the quick fix, use the patch above: http://drupal.org/files/issues/domain_form_alter.patch

That works, thank you! Another bug bites the dust!

--
stephen@hardfocus

agentrickard’s picture

@hardfocus

Note that the patch used above is not going into the release version. The long-term fix is simply to change domain_init() to domain_boot().

agentrickard’s picture

Status: Fixed » Active

OK. This is not fixed. Moving this to hook_boot() breaks hook_domainload().

agentrickard’s picture

Status: Active » Fixed

I had to use the patch in #2 to fix this issue. See the Changelog for details.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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