Whenever I try to enable sharing translations with server I get the error: "Invalid localization server address specified. Make sure you specified the right server address." And when dpm(xmlrpc_errno()) and dpm(xmlrpc_error_msg()) I get "403" and "Forbidden".

This is happening both with "http://localize.drupal.org" and "https://localize.drupal.org" as server. Is it possible the server is denying me access? I've tried this on two different server setups and on simplytest.me as well all with the same outcome.

CommentFileSizeAuthor
#20 2638468.patch609 bytesGábor Hojtsy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexverb created an issue. See original summary.

Zoltán Balogh’s picture

Priority: Normal » Critical

Yes, here too. Currently, the sharing function of the Localization Client module does not work, because the users can not enable the sharing function.

Zoltán Balogh’s picture

Project: Localization client » localize.drupal.org
Component: Code » Infrastructure

https://localize.drupal.org/xmlrpc.php -> Error 403 Forbidden.

Please, set the public access of this URL.

Gábor Hojtsy’s picture

Gábor Hojtsy’s picture

Title: Enable sharing translations with server (403 - Forbidden response) » 403 forbidden on localize.drupal.org/xmlrpc.php
Gábor Hojtsy’s picture

Pinged the issue to @drumm. I don't believe I can do anything about this personally.

drumm’s picture

Project: localize.drupal.org » Drupal.org infrastructure
Version: 7.x-1.x-dev »
Component: Infrastructure » Servers

This looks like a misconfiguration of Fastly.

basic’s picture

if ( req.url ~ "^/xmlrpc.php"
&& req.http.host ~ "^(qa.drupal.org|localize.drupal.org|updates.drupal.org|www.drupal.org|drupal.org)$") {
error 403 "Forbidden.";
}

is our current configuration and has not changed since Dec 03 2015

drumm’s picture

I was thinking it should look more like:

# Only allow xmlrpc for localize
if (req.url ~ "^/xmlrpc.php" && req.http.host != "localize.drupal.org") {
  error 403 "Forbidden.";
}
Zoltán Balogh’s picture

Gábor Hojtsy’s picture

Zoltán Balogh’s picture

I think, since the current configuration was set (Dec 03 2015) localize.drupal.org/xmlrpc.php is forbidden. This issue created on December 20, 2015 and only the new installations are affected.

tazir1’s picture

I think the issue was just solved.
I just went to: admin/config/regional/translate/client change the "Address of localization server to use" to "https://localize.drupal.org/". Now its working well (translations saved locally and also sent & received by https://localize.drupal.org/ ).

Zoltán Balogh’s picture

You tried to submit the form at admin/config/regional/translate/client? If you set the "Address of localization server to use" to "https://localize.drupal.org/" before than Dec 03 2015, then that is ok, sharing of the translations works well. Try to submit that form, please, and you will see the error message: Invalid localization server address specified. Make sure you specified the right server address.

I think, in your case the "l10n_client_server" variable already set, so the translation interface is works well. But if you create a new Drupal installation, this variable is empty, and you can not set, because you can not submit the form at admin/config/regional/translate/client without error, and the "l10n_client_server" variable stay empty, and the sharing of translations does not works.

Temporary solution:
drush vset l10n_client_server https://localize.drupal.org/

Gábor Hojtsy’s picture

But sending the translations itself works with the same xmlrpc endpoint, why is that not a 403 then?

drumm’s picture

I see the default setting hasn't been updated to https://localize.drupal.org. The XML-RPC requests do go through drupal_http_request() which seems to have trouble with https and redirects to https in some configurations. See also #1538118: Update status does not verify the identity or authenticity of the release history URL. Making https default will remove any redirection-related issues.

I'm not aware of any recent changes on our end.

Zoltán Balogh’s picture

I update my opinion, sending the translations itself does not works too. 403: Forbidden...

robertgarrigos’s picture

I had this problem with a new installation but setting the server with drush

drush vset l10n_client_server https://localize.drupal.org/

solved the problem. When translating I get the message

Translation sent and accepted by https://localize.drupal.org/.

Neograph734’s picture

Cross posting from #2705877: Fix instances of wrong localize.drupal.org defaults and other outdated http links:

You need to manually enforce the translation server variable (l10n_client_server) to be http://localize.drupal.org/. The current default variable http://localize.drupal.org (without the trailing slash) no longer appears to work.

I managed to get this working with Drush, but setting is via the UI at admin/config/regional/translate/client worked fine as well. Just append a slash to the default variable.

The strange thing is that the Localization client module seems to always appends /xmlrpc.php to the server URL:

function l10n_client_submit_translation($langcode, $source, $translation, $user_key, $user_token) {
  ...
  $server_url = variable_get('l10n_client_server', 'http://localize.drupal.org');

  $response = xmlrpc(
    $server_url .'/xmlrpc.php',
    ...

So http://localize.drupal.org/xmlrpc.php (the default) doesn't work, but http://localize.drupal.org//xmlrpc.php does? It at least solves the problem.

Gábor Hojtsy’s picture

Title: 403 forbidden on localize.drupal.org/xmlrpc.php » 403 forbidden on http://localize.drupal.org/xmlrpc.php due to redirects
Project: Drupal.org infrastructure » Localization client
Version: » 7.x-1.x-dev
Component: Servers » Code
Status: Active » Fixed
FileSize
609 bytes

#2705877: Fix instances of wrong localize.drupal.org defaults and other outdated http links is now fixed for Drupal 7 and 8. We should have an update path in localization client on 7 to update existing sites. I'm moving this now to the localization client queue. This is the upgrade path.

  • Gábor Hojtsy committed 9f369b3 on 7.x-1.x
    Issue #2638468 by Gábor Hojtsy, Zoltán Balogh, drumm, alexverb,...

Status: Fixed » Closed (fixed)

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

Honza Pobořil’s picture

Will be nice to make a release with this fixes.