I had this problem when trying to translate a node (with the base translation module)
ex : http://mywebsite.com/fr/node/add/description?translation=77331&language=en
Since the last domain_access update, the form's action was :
<form action="http://mywebsite.com/fr/node/add/description?translation=77331&amp;amp;language=en" accept-charset="UTF-8" method="post" id="node-form" enctype="multipart/form-data">
So the language wasn't retrieved from the get object when submitting

I investigated and found this line in the domain.module file, in the domain_form_alter function line 1503 :
$form['#action'] = check_url($_domain['scheme'] .'://'. $_domain['subdomain'] . $action['path'] . $action['query']);
So there's a double check_url function called by the domain_form_alter and by theme_form (form.inc) functions.
I removed the check_url in the domain_form_alter like in the previous version of domain_access to remove the problem :
$form['#action'] = $_domain['scheme'] .'://'. $_domain['subdomain'] . $action['path'] . $action['query'];

Is there a special reason why the check_url function was added in the last version of domain_access ?

CommentFileSizeAuthor
#2 638816-action.patch964 bytesagentrickard

Comments

agentrickard’s picture

Status: Active » Needs review

Overzealous security check. Nice catch.

agentrickard’s picture

StatusFileSize
new964 bytes

And a patch for review.

agentrickard’s picture

And a note that bugs like this get introduced because no one reviews my patches.

This isn't getting committed until someone else tests it.

nonsie’s picture

I'll get back to work and projects with translation/locale/i18n enabled tomorrow and will test it out. No local copy atm

nonsie’s picture

Status: Needs review » Reviewed & tested by the community

I tried it with DA 2.0 and core content translation/locale and was not able to replicate this bug however I think removing check_url() in this case is a good idea.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 6--2 and HEAD. Gracias.

Status: Fixed » Closed (fixed)

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