Привет. я так понимаю перенос с хостинга на хостинг. Явно что-то нахимичил/недозаполнил в настройках, внимательно пути проверяй в конфигах…
Не страшно как бы ) Все не к спеху
Думаю допилим. Просто уже после праздников.
Николай, Вк как раз сейчас стал отдавать, я тестово запускал скрипт без привязки к modHybridAuth. Прекрасно подтянулся он в массив токена. Здесь причина глубже. Буду рад если кто-то сможет помочь. Допилим до конца — вещь полезная)
Не буду утверждать наверняка, но некоторые соцсети сейчас в принципе не отдают емейлы, типа по политикам безопасности. Может и ВК перестал отдавать. Чуть позже Лев Вербицкий посмотрит, он у нас специалист по соцсетям.
Публикую скрипт
<?php class Hybrid_Providers_vk extends Hybrid_Provider_Model_OAuth2 { function initialize() { parent::initialize(); $this->api->authorize_url = "http://oauth.vk.com/authorize"; $this->api->token_url = "https://oauth.vk.com/access_token"; $this->api->sign_token_name = "code"; if( $this->token( "access_token" ) ){ $this->api->access_token = $this->token( "access_token" ); $this->api->refresh_token = $this->token( "refresh_token" ); $this->api->access_token_expires_in = $this->token( "expires_in" ); $this->api->access_token_expires_at = $this->token( "expires_at" ); $this->api->token_user_id = $this->token( "user_id" ); $this->api->email = $this->token( "email" ); } } function getUserProfile() { if ( $this->api->access_token ) { $params = array( 'uids' => $this->api->token_user_id, 'fields' => 'uid,first_name,last_name,screen_name,sex,bdate,photo_big', 'access_token' => $this->api->access_token ); $userInfo = json_decode(file_get_contents('https://api.vk.com/method/users.get' . '?' . urldecode(http_build_query($params))), true); if (isset($userInfo['response'][0]['uid'])) { $userInfo = $userInfo['response'][0]; $result = true; } } if ($result) { $this->user->profile->identifier = $userInfo['uid']; $this->user->profile->firstName = $userInfo['first_name']; $this->user->profile->displayName = $userInfo['screen_name']; $this->user->profile->photoURL = $userInfo['photo_big']; $this->user->profile->gender = $userInfo['sex']; $this->user->profile->email = $this->api->email; $this->user->profile->emailVerified = $this->api->email; return $this->user->profile; } else { throw new Exception( "User profile request failed! {$this->providerId} returned an invalide response.", 6 ); } } }
Такой вопрос только остался открытым все работает, но не получается подтянуть к профилю email. Так и не понял почему $this->user->profile->email. В первичном запросе к vk api указал параметр scope=email как указано в букваре api. Теперь поидее он должен подтянуться в массиве токена $this->token( «email» ); Но почему то не работает. Может у кого-то есть идеи как исправить
Доброго всем дня(вечера ночи))). Вопрос такой — после переноса ревы белый экран и на самом сайте и на входе в админку.
Кеш чистил, все что нужно правил, через установку делать файлы конфигурации пробовал.
Не трольте только новичек)))
Логи из core/cache/logs
[2016-02-22 22:14:57] (ERROR @ /index.php) Path specified for package gallery is not a valid or accessible directory: /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/
[2016-02-22 22:14:57] (ERROR @ /index.php) Could not load class: Wayfinder from wayfinder.
[2016-02-22 22:14:57] (ERROR @ /index.php) Could not load class: Gallery from gallery.
[2016-02-22 22:14:57] (ERROR @ /index.php) Problem getting service gallery, instance of class Gallery, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/gallery/
[2016-02-22 22:14:57] (ERROR @ /index.php) Could not load class: Migx from migx.
[2016-02-22 22:14:57] (ERROR @ /index.php) Problem getting service migx, instance of class Migx, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/migx/model/migx/
[2016-02-22 22:15:01] (ERROR @ /manager/index.php) Path specified for package gallery is not a valid or accessible directory: /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/
[2016-02-22 22:15:01] (ERROR @ /manager/index.php) Could not load class: Gallery from gallery.
[2016-02-22 22:15:01] (ERROR @ /manager/index.php) Problem getting service gallery, instance of class Gallery, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/gallery/
[2016-02-22 22:15:01] (ERROR @ /manager/index.php) Could not load class: Ace from ace.
[2016-02-22 22:15:01] (ERROR @ /manager/index.php) Problem getting service ace, instance of class Ace, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/ace/model/ace/
[2016-02-22 22:15:44] (ERROR @ /index.php) Path specified for package gallery is not a valid or accessible directory: /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/
[2016-02-22 22:15:44] (ERROR @ /index.php) Could not load class: Wayfinder from wayfinder.
[2016-02-22 22:15:44] (ERROR @ /index.php) Could not load class: Gallery from gallery.
[2016-02-22 22:15:44] (ERROR @ /index.php) Problem getting service gallery, instance of class Gallery, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/gallery/model/gallery/
[2016-02-22 22:15:44] (ERROR @ /index.php) Could not load class: Migx from migx.
[2016-02-22 22:15:44] (ERROR @ /index.php) Problem getting service migx, instance of class Migx, from path /home/masterplit/domains/nizhegorodka.com/public_html/core/components/migx/model/migx/
&includeContent=`1` скорее всего не хватает в сниппете
[[+comments]] и [[!+or.comment]]
Буква s лишняя
Давай :)
Запрос давно уже был modxclub.ru/blog/234.html