2

Magento CE 1.702 と共に Fishpig Wordpress Integration をインストールしました。

WordPressは次のように設定されています:

Database
    Charset                              utf8
    Table Prefix                         wp_
integration
    Integrate Theme                      Yes
    Home URL                             blog
    Path                                 wp
    Single Store                         no

この書き換えルールを使用して、フロントエンドから index.php を削除しました。

`<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>`

問題は、Fishpig Wordpress の自動ログインが次のエラーで機能しなくなったことです。

ログインできません。以下の WordPress 管理者ログインの詳細を確認してください。

スタックトレース :

> 2014-05-08T13:25:36+00:00 DEBUG (7): exception 'Exception' with message 'WordPress Auto Login Failed: HTTP/1.1 401 Authorization Required
Date: Thu, 08 May 2014 13:25:36 GMT
Server: Apache/2.2.22
Vary: Accept-Encoding
Content-Length: 482
Content-Type: text/html; charset=iso-8859-1' in /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/community/Fishpig/Wordpress/Helper/System.php:493
Stack trace:
#0 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/community/Fishpig/Wordpress/controllers/Adminhtml/WordpressController.php(34): Fishpig_Wordpress_Helper_System->loginToWordPress('myUserName', 'myPassword', 'http://dummyurl...')
#1 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Fishpig_Wordpress_Adminhtml_WordpressController->loginAction()
#2 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('login')
#3 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#5 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#6 /nfs/c03/h03/mnt/168517/domains/dummyurl.com/html/index.php(87): Mage::run('', 'store')
#7 {main}

Fishpig のサポートに連絡したところ、次のように言われました。

index.php を使用しないように Magento インストールを構成する必要があります。

次のように、管理領域から index.php を削除しました。

    RewriteRule ^index.php/admin/(.*)$ /my-admin/$1 [L,R]

これは自動ログインの問題を解決しませんでした。自動ログイン ボタンの URL に index.php が含まれていることに気付きました。そのため、次のように wordpress .htaccess の index.php を削除しました。

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wp/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wp/index.php [L]
RewriteRule ^/wp/index.php/(.*)$ /wp/$1 [L,R]
</IfModule>

これにより、管理 URL から index.php が削除されましたが、自動ログイン ボタンからは削除されませんでした。

http://dummyurl.com/index.php/admin/wordpress/login/key/72a947f0e9452bfd6e92258d31ce7cd2/

私はこれで頭を探して壊してきました。どんな助けも大歓迎です。

4

1 に答える 1