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;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 ?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 638816-action.patch | 964 bytes | agentrickard |
Comments
Comment #1
agentrickardOverzealous security check. Nice catch.
Comment #2
agentrickardAnd a patch for review.
Comment #3
agentrickardAnd a note that bugs like this get introduced because no one reviews my patches.
This isn't getting committed until someone else tests it.
Comment #4
nonsieI'll get back to work and projects with translation/locale/i18n enabled tomorrow and will test it out. No local copy atm
Comment #5
nonsieI 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.
Comment #6
agentrickardCommitted to 6--2 and HEAD. Gracias.