Comments

duozersk’s picture

Emilio,

Thanks for testing the module! I have added the additional checks on the drupal_http_request() error - it should prevent these warnings.
Commit - http://drupalcode.org/project/yandex_webmaster.git/commit/cdc78ab

Thanks
AndyB

duozersk’s picture

Duplicate comment.

Plazik’s picture

I got the same error:
Exception: String could not be parsed as XML в функции SimpleXMLElement->__construct() (строка 448 в файле /var/www/username/data/www/site.ru/sites/all/modules/yandex_webmaster/includes/yandex_webmaster.inc).

duozersk’s picture

Nickolay,

Could you please provide more details on this error? Did you get it on the screen when performing some actions? Then what actions were you doing?
Or did it get logged into the Drupal log? As if this is the case - then this is by design (and is exactly what was done in #1), these errors should be logged there - and they mean that smth went wrong when performing request to Yandex.

Thanks
AndyB

Emilio13’s picture

Потестировал и выснил, что на моем сайте ошибку
Exception: String could not be parsed as XML в функции SimpleXMLElement->__construct() (строка 448 в файле /home/.../data/www/....ru/sites/all/modules/yandex_webmaster/includes/yandex_webmaster.inc).
кажется вызывает знак %
Например, вот такой текст в теле ноды приводит к ошибке "Почками выводится от 60 до 80%"

Emilio13’s picture

В логах модуля вот такая ошибка:
Yandex.Webmaster original texts request to https://webmaster.yandex.ru/api/v2/hosts/19604573/original-texts/ failed with code 405.

Plazik’s picture

Я сделал такое Правило http://s005.radikal.ru/i209/1312/92/4645dc107a15.png
Т.е. после сохранения документа отправлять текст в Яндекс.

Но после сохранения ноды появилась ошибка, ее я не записал, но в логах друпало появилось сообщение:

Exception: String could not be parsed as XML в функции SimpleXMLElement->__construct() (строка 448 в файле /var/www/user/data/www/site.ru/sites/all/modules/yandex_webmaster/includes/yandex_webmaster.inc).

duozersk’s picture

Emilio, Nickolay,

Thank you for coming back with this, it looks like I forgot to implement the URL-encoding of the data sent as the original text.
It should be fixed here - http://drupalcode.org/project/yandex_webmaster.git/commit/d746fc7 - please get the snapshot code from there (http://drupalcode.org/project/yandex_webmaster.git/snapshot/d746fc7.tar.gz) and test it out.

AndyB

Plazik’s picture

duozersk, it works for me now. Thank you.

duozersk’s picture

Assigned: Unassigned » duozersk
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

Manav’s picture

Issue summary: View changes

Hi Emilio13,
I got the same error in my custom module and finally i got the solution for this basically i was using this

$http_result = drupal_http_request($apicall); 
$data = simplexml_load_string($http_result->data); 

and got the same error but after google it 4-5 hrs on net i got a solution where i have just change the
$data = simplexml_load_string($http_result->data); with
$data = drupal_json_decode($data); and my error has gone.