slogin & vk - Notice: Trying to get property of non-object in 60 line

More
9 years 1 month ago #4424 by Leonid Kuznecow
Notice: Trying to get property of non-object in /home/2667399/www/plugins/slogin_auth/vkontakte/vkontakte.php on line 60

что я делаю не так ?

куда посмотреть?

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4426 by Leonid Kuznecow
авторизация не проходит

сорри за дубль вопрос

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4428 by JoomLine
Если вы качали пакет более 2 дней назад то перекачайте его еще раз и установите поверх, эту ошибку мы исправляли.
github.com/Arkadiy-Sedelnikov/slogin/com...0e44edeffb4edc59ae81
Но это не должно влиять на авторизацию.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4443 by Kuznecow Leonid
нет не работает
ответ
"NULL"

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4444 by Kuznecow Leonid
добавлю разбор json что-то не так

на $data = json_decode($controller->open_http($url));

на выходе имеем
JSON_ERROR_SYNTAX:

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4445 by Kuznecow Leonid
добавлю если ручками по $url сходитить то
{"access_token":"ччччч","expires_in":0,"user_id":264170450,"email":"ччч@ччччч.ччч"}

ччч - это я вырезал :-)

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4446 by JoomLine
Гхм... судя по описанию, ваш хостинг провайдер блокирует передачу данных к социальной сети.
Так как если вы в ручную извлекаете данные, значит все нормально ссылка правильная.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4447 by Kuznecow Leonid
хм, да нет я сам себе хостинг провайдер
там впс у меня

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago - 9 years 1 month ago #4448 by Kuznecow Leonid
однако все-же косяк найден

string(210) "oauth.vk.com/access_token?client_id=4787186 &client_secret=чччч&code=чччччч&redirect_uri=https%3A%2F%2Fччччччч.ru%2F%3Foption%3Dcom_slogin%26task%3Dcheck%26plugin%3Dvkontakte"

обратите внимание на наличие пробела после значения client_id и перед &client_secret

:-)
жду багофиксу

т.е если я правильно понимаю когда плугин к slogin получает client_id пароли и прочее
интерфейс не обрабатывает не обрезает пробелы с хвоста а прямо так и сохраняется в в конфиге

некорошо это :-)
Last edit: 9 years 1 month ago by Kuznecow Leonid.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4449 by JoomLine
Так это значит вы с пробелом ключ вставили, кто же защитит вас от самих себя? :-)

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4450 by Leonid Kuznecow
защита обычно простая

trim

(PHP 3, PHP 4, PHP 5)
trim -- Удаляет пробелы из начала и конца строки

добавте обработку и все будет гуд

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4451 by JoomLine
Спасибо за предложение.
Но тут проблема в другом. Это получается придется чистить ключи при каждой инициализации. А сами поля xml Joomla отчищать пробелы не умеют.
По этому правильней не делать костылей, а все же уповать на внимательность пользователей.

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4452 by Kuznecow Leonid
нуу мысль была что бы проверять параметры (тримингом исправляя) в момент установки-настройки плагина

Please Log in or Create an account to join the conversation.

More
9 years 1 month ago #4454 by JoomLine
мы подумаем, что можно будет сделать, сейчас добавили некоторые новые опции для Slogin.
Вы всегда можете предложить идею или какое то решение на github.
github.com/Arkadiy-Sedelnikov/slogin

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

© 2010- JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. joomline.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.