Closed (fixed)
Project:
Drupento
Version:
6.x-1.1-alpha2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Issue tags:
Reporter:
Created:
15 Feb 2011 at 14:09 UTC
Updated:
24 Jul 2012 at 18:03 UTC
Hello,
I try to deal with Single Sign On (SSO) between Magento and Drupal. Drupento are suppose to provide this functionnality.
But when I try it, I have an error : Invalid api path
I search, and I found the issue, line 84 on drupento.auth.module, api use "drupento_customer.login" key.
I don't have this key on my Magento. I suppose, I need a module on magento to get this key ?
Thanks for your help,
Yan
Comments
Comment #1
mdeltito commentedYan,
You are correct, there is a Magento extension that you will need to work with SSO in Drupento. We are in the process of packaging it for Magento Connect. In the meantime, you can clone/download the Drupento project (including the Magento extension) from our Bitbucket repository here.
You will need to manually install the Drupento extension at this time by placing the Drupento extension directory in /app/code/local and the Drupento_All.xml file in /app/etc/modules
I'll update the project page with this information. Please let me know if you have any questions.
Comment #2
graouxx commentedThanks for your quick answer.
We'll try with the magento extension. Then I will tell you if it works.
Comment #3
mdeltito commentedComment #4
graouxx commentedHello,
I Had magento extension but I still have an issue :
Uncaught SoapFault exception: [4] Resource path is not callable
Maybe, you have an idea ?
Thanks again for your help
Edit : I disable compilation and error disappear
Edit2 : when I try to connect from Drupal, it works, but I'm not connected on Magento side. I forgot something ?
Comment #5
mdeltito commentedYan,
I have seen the message "Resource path is not callable" appear when I had a space at the beginning of a controller file. Also, I have never run Drupento with compilation turned on, I would imagine there are issues there as well.
Per Edit2 - when you say "connect" what are you referring to? SSO? Drupento::Output calls?
Comment #6
graouxx commentedI'm reffering to SSO.
step 1 : log into drupal with customer account
step 2 : go to magento >> I should be log (SSO), but I'm still anonymous
I check this line on Drupal side (drupento_auth.module) :
$valid_user = Drupento::Api_get('drupento_customer.login', array( $email, $password, $store ));
I print $valid_user and it seems to be good, it return the good user.
Any idea ?
Comment #7
mdeltito commentedYan,
Clear your cookies, and try again.
Can you give me some information on your environment, also?
Comment #8
graouxx commentedI found the solution !
Magento and Drupal was not on the same VirtualHost, so my Cookie/Session are not shared ...
Now I have magento on a subfolder "store" on my Drupal. So it works.
I have still one issue. Rewrite rules of Drupal break magento url.
I mean if I access to http://drupal/store/magento_url.html, I fall on a 404 error page.
So maybe you can send me your .htaccess ?
Thanks,
Comment #9
mdeltito commentedThe standard drupal .htaccess should work fine. The rewrite rules should let the /store/index.php path pass through, since that files exists.
Comment #10
graouxx commentedHello !
This is my apache dev conf :
DocumentRoot /mnt/drupal/www
ServerName drupal.dev
Alias /store/ "/mnt/magento1324/www/"
AllowOverride All
Allow from all
Allow from all
AllowOverride All
# Autres directives ici
If I go to drupal.dev/store it works (I can see magento home page)
But If I go to drupal.dev/store/categorie1.html I fall in drupal 404 error
I think drupal default htaccess trap html pages.
Edit : If I had index.php in the path, it works :
drupal.dev/store/index.php/categorie1.html
But magento default links are not like this.
Comment #11
graouxx commentedI find the solution
I need to uncomment this line in .htaccess on magento directory :
#RewriteBase /magento/
Comment #12
graouxx commentedI don't know why, but when I use SSO, frontend cookie is store with "drupal.dev" cookie without starting with a dot.
So it doesn't work, it have to be ".drupal.dev" to work ...
Comment #13
mdeltito commentedthe issue you mention in #12 is fixed in tip
Comment #14
mdeltito commentedgraouxx and I worked through several issues, all of which are fixed and will be in the next dev release.
considering this fixed
Comment #16
meaux commentedIve installed Drupento I am having an issue. When I try to use the Drupento::Node_load('node', 1) on the magento side I get "Class 'Drupento' not found in /...../". Do I need to include this module somewhere for magento to find the Class?
On the drupal side, when I use "Drupento::Output('callback', 'print_product_menu');", I get an error stating "The cache file could not be generated. Check the Drupento configuration options and file permissions". I have the drupal/cache directory set at 777 and the Cache directory umask set to 0777. I know that drupento pulling information from magento because "Drupento::Api_get('drupento_category.tree', array(7), true)" call is returning information.
Any suggestion would be appreciated.
Comment #17
mdeltito commented@meaux
I see that you created a new thread for this issue - feel free to delete it from this one if you'd like
Comment #18
sree_1234 commentedHi,
I ve installed Drupento and i was unable to login and also when registered iam getting the below errors:
Fatal error: Uncaught SoapFault exception: [Receiver] Unknown error in C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\Drupento.class.php:271 Stack trace: #0 [internal function]: SoapClient->__call('call', Array) #1 C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\Drupento.class.php(271): SoapClient->call('1ad391d97f156b3...', 'drupento_custom...', Array) #2 C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\Drupento.class.php(285): Drupento::Api_get('drupento_custom...', Array, false) #3 C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\drupento_auth.module(97): Drupento::Call('drupento_custom...', Array) #4 C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\drupento_auth.module(447): drupento_customer_login('sree@gma...', 'sree') #5 C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\drupento_auth.module(141): _drupento_auth_external_login('sree@gma...', 'sree') #6 C:\xampp\htdocs\drupal_magento\drupal\includes in C:\xampp\htdocs\drupal_magento\drupal\sites\all\modules\drupento\Drupento.class.php on line 271
and on magento side no menu or link in configuration can any one please help me to integrate single sign on for drupal and magento.
Comment #19
sree_1234 commentedHi,
I have corrected my configuration settings for drupento now it is working fine.
as when user registered automatically it creates user in magento.
But the user created with wrong store_id, website_id and group_id.
I have updated those with overriding module. so now the user can login from drupal.
But magento the user is not logged in still.
the log errors:
2012-07-24T09:55:27+00:00 ERR (3): Strict Notice: Declaration of Drupal_Integration_Model_Server_Handler::login() should be compatible with that of Mage_Api_Model_Server_Handler_Abstract::login() in /var/www/drupalcms/magento/app/code/local/Drupal/Integration/Model/Server/Handler.php on line 4
2012-07-24T09:55:29+00:00 ERR (3): Strict Notice: Declaration of Drupal_Integration_Model_Server_Handler::login() should be compatible with that of Mage_Api_Model_Server_Handler_Abstract::login() in /var/www/drupalcms/magento/app/code/local/Drupal/Integration/Model/Server/Handler.php on line 4
2012-07-24T09:55:29+00:00 DEBUG (7): attempting to authenticate test@gmail.com
2012-07-24T09:55:29+00:00 DEBUG (7): include(DrupentoConf.php) [function.include]: failed to open stream: No such file or directory/var/www/drupalcms/magento/lib/Varien/Autoload.php
2012-07-24T09:55:29+00:00 DEBUG (7): include() [function.include]: Failed opening 'DrupentoConf.php' for inclusion (include_path='/var/www/drupalcms/magento/app/code/local:/var/www/drupalcms/magento/app/code/community:/var/www/drupalcms/magento/app/code/core:/var/www/drupalcms/magento/lib:.:/var/www/zend_library/library:/var/www/zend_library/bin')/var/www/drupalcms/magento/lib/Varien/Autoload.php
2012-07-24T09:55:30+00:00 DEBUG (7): authenticated test@gmail.com from Drupal
2012-07-24T09:55:30+00:00 DEBUG (7): authentication successful: Array
(
[name] => test
[email] => test@gmail.com
[customer_group] => General
)
Please anyone help me in solving this SSO issue.
Thanks in adv.