Drupal : Fatal error: Call to undefined function oauth_common_authorization_levels() in...

這次輪到 Services OAuth 了!

錯誤訊息:

Fatal error: Call to undefined function oauth_common_authorization_levels() in xxx\sites\default\modules\services_oauth\services_oauth.admin.inc on line 19

請先確認一下您裝得版本是否正確

NOTICE: The 6.x-2.x branch of services_oauth is not compatible with the 6.x-2.x branch of services. To use the 6.x-2.x branch you must use the 6.x-3.x branch of services.

如果您剛好 Services 是裝 6.x-2.2 版
而 Service OAuth 就只能裝 6.x-1.0-beta6 版
你應該在 admin/build/services/authentication 會遇到上面的錯誤畫面
請修改這兩支檔案

1. services_oauth.admin.inc
第 19 行請改成
foreach (oauth_common_context_load_all() as $name => $level) {

2. services_oauth.inc
第 79 行請改成
$autho_levels = oauth_common_context_load_all();


這樣就功德圓滿了~

Comments

Popular posts from this blog

CentOS7 如何新增/移除 Rich Rule for firewalld

mac 安裝 mtr

如何設定 SSL VPN 分割通道 on Fortigate 80C