Login not passing through
dixieau - February 24, 2007 - 22:13
| Project: | The Next Generation Integration |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | arturoramos |
| Status: | active |
Description
I am using 5.0 + TNG 6.0.4 set up went well, but login is not being passed through to TNG at all. Neither for my self (admin) nor current users.
Also I have tried creating new accounts (via TNG & Drupal), approved them and login still not passing through with new user.
Any idea's?
Thanks

#1
Changing status to "needs more info"
Please provide details of what error you are getting or what is showing up in the IFRAME when you click on the TNG menu item in Drupal.
Also, please try commenting out line 163 of the script and then viewing the source code for the IFRAME. This should provide some clue as to what is occuring. What browser are you using? Does it support JavaScript?
#2
Thanks for your reply.
The set up is:
For drupal we have - /home/xxxx/public_html/drupal/
For TNG we have - /home/xxxx/public_html/drupal/tng
When I click on TNG in the menu (ie www.example.com/tng/ it goes straight to the external application and is not logged in at all, nor is it showing in an iframe. TNG is still at it's basic format with no templates in place or modifications.
Each has there own database (I have tried with the database info entered in settings.php and without) no diff
Have commented out line 163 - no difference
I think that covers everything, there is a screenshot of settings page attached
#3
First of all, the module will only work if both TNG and Drupal share the same database. I should have explained this in the readme.txt file. I will add that to the instructions.
Also, when you say you are typing www.example.com/tng... that reads to me like you are not accessing TNG through the Drupal module, but rather directly. You need to add the menu item through the Drupal admin (admin/build/menu) and then access it through there. You can add it either as a Primary link (see screenshot) or as a Navigation item.
Unless you have url rewrite, your path should look like this when you are accessing TNG through the module:
http://localhost/drupal5/?q=en/tng
and TNG should appear in an IFRAME within the main content area of Drupal.
#4
All sorted and thanks for your patience.
I believe the problem was that I had previously installed the Drupal/TNG mod (which I also couldn't get working) from the TNG site...
I thought this one was an update of that one, maybe you need to let Darrin know there is another? Not sure there.
I ended up deleting the lot, moving the tng database into drupal and the links finally worked (inside an iframe too)
So all is good in my neck of the woods and very happy with both.
I do have one question, I would like to make the length of the iframe longer and possibly a tad narrower, what area would I change that in?
Great work on the mod and look forward to updates as you go along.
Cheers Rhonda
#5
I'm also having this issue. Same database for both being used. I don't know if I'm using the wrong directory structure; TNG is in the same directory as drupal, meaning both are in my html folder. Are the names automatically matched or must I directly associate the tng and drupal user names? How exactly would I call the tng location in the menu item setup? Thank you.
#6
No you don't need to match user's.
Have you read through the above posts and looked a the screen shots to compare information with your setup?
If everything is still looking good and it's not working I woul suggest you post back with more info for help ie example url of your directories, which drupal you are using 5.x etc
Did you happen to download the drupal integrate from the TNG download page and try that first? If so you need to remove it and re-install this one to get it all working. That was my problem, I thought this one was an update and installed it my mod directory beside the other but it still messed everything up.
#7
ok...the integration files are from this site, not tng. I have a geneaology directory and a drupal directory. Both are separate and in the html directory. I'm using the following settings
Path to TNG directory (include trailing slash): /geneaology/
In the menu settings the path is full, meaning http://...etc
I suppose one problem is that I don't know how to reconcile those two settings, does one override the other? I did try every variation of /genealogy/, genealogy/, genealogy and received the 'page not found' error, within drupal
I did check the database to verify that all users exist in both tables...
I had been using phpgedview, and had that working integrated with drupal, but I had issues betwenn firefox and ie not working correctly at the same time, which is the only reason I went to tng...
Thank you so much for your time.
#8
lol, yeah this part took me a while to get when I was trying to integrate pgv.
Even though your directory is /genealogy the path to it needds to be/tng, they sync on their own somehow.
Refer to
No 2 above http://drupal.org/node/122348#comment-203290
No 3 above http://drupal.org/node/122348#comment-203310
So technically change the path to tng (not genealogy) and all should work *cross fingers*
#9
Wow, you're quite amazing....that did the trick.....one would think that a major detail like that would be more clearly documented....THANK YOU!!!!!! I think this is the fasted resolution I've ever achieved in any support forum. Now if I could just figure out how to get rid of that horrendously plain public home....yuck, but I can work on that later now that the site is working correctly. Thanks again.
#10
Installed Drupal 5.2 and TNG 6.1.2
tngintegrate downloaded from drupal.org
Drupal installed at www.example.com/cms
/home/xxxx/public_html/cms
TNG installed at www.example.com/cms/tng
/home/xxxx/public_html/cms/tng
TNG sharing Drupal database
TNG Genealogy Drupal settings are the recommended default settings.
Problem: Launching TNG with http://familyhistoryjournal.com/cms/?q=tng does not log the current Drupal user into TNG.
A TNG login screen appears but login always fails though the current user and password does get added to tng_user in the Drupal database. The public TNG menus are accessible but only with NO admin rights.
Launching TNG ouside of Drupal also fails on login, so effectively the only way to gain admin access to TNG is to drop the TNG database and use TNG standalone.
I have tried commenting out line 163 of tngintegrate module and below is the iframe source (I have changed input type=hidden name=tngusername value to User_Name and input type=hidden name=tngpassword value to *******)
<SCRIPT>var frameSrc = "";frameSrc += "<HTML><BODY>";frameSrc += "<FORM name=login method=post action=tng/processlogin.php>";frameSrc += "<input type=hidden name=tngusername value=User_Name>";frameSrc += "<input type=hidden name=tngpassword value=*******>";frameSrc += "</FORM>";frameSrc += "<script>";frameSrc += "<\/script>";frameSrc += "<\/BODY><\/HTML>";var iframeWin;function init(){ iframeWin = window.frames.anIframe; iframeWin.document.open(); iframeWin.document.write(frameSrc); iframeWin.document.close();}</SCRIPT><IFRAME ID="anIframe" NAME="anIframe" SRC="about:blank" WIDTH="100%" HEIGHT="2500px"hspace=0 vspace=0 marginwidth=0 marginheight=0 frameborder=0 scrolling=auto></IFRAME><script> init();</script>Any help appreciated.
#11
This module does not give ANY rights within TNG, it simply creates a new user and grants them the default rights in TNG. If the user already exists in TNG, i.e. the username in Drupal matches the admin username in TNG, then it will simply log in that user and the user will have the rights assigned IN TNG. Any new user created can of course have their rights altered or enhanced in TNG by the admin and the next time Drupal logs them in they will have those rights.
#12
I must be missing something here.
Whatever I do, at some point I end up not being able to access TNG with admin rights. The only way I can get back into TNG as Admin is by dropping the TNG database.
#13
Having played around with this, I have noticed this problem only seems to arise after I have logged out of Drupal. When I next log into Drupal I am re-directed to the TNG public page, but outside of Drupal. A second attempt at login will log me in and take me to my default Drupal home page. At this point TNG seems to no longer recognise any TNG user including admin. The only way back in is to drop the TNG database.
This problem is none too easy to describe, I just hope you can follow!
#14
Played around with this some more:
This module does create a username and password in tng_users but if I use tng/admin/ to review the user account, tng/admin shows the user having NO password and warns a password is required if I modify the user credentials.
If the user already exists in the tng_users table (ie created using /tng/admin/) then this user's account becomes inaccessible. If this user is the only user with admin rights then one is effectively locked out as TNG admin. I now create an admin user which I only access through tng/admin/ to avoid this problem.
Problems raised in my previous post seem to relate to clearing private data when exiting Firefox: ie deleting cache, cookies and authenticated sessions.
#15
Played around with this for even longer:
If I create a user in Drupal eg Tom_Jones (with NO space) and login to Drupal with this user name, this module works OK.
If I create a user in Drupal eg Tom Jones (with space) and login to Drupal with this user name, then although the user/password is created in tng_users the TNG authentication fails and the TNG login screen appears. In this case, login to TNG from http://www.example.com/cms/?q=tng always fails.
Would appreciate someone with a working install testing this observation.
#16
Chenge Line 159 from:
$output .= 'frameSrc += "<input type=hidden name=tngusername value='.$f_username.'>";';to:
$output .= 'frameSrc += "<input type=hidden name=tngusername value=\"'.$f_username.'\">";';Let me know if it works and it so, I will update the code. For some reason this bug, which was corrected in an earlier version appears to have crept back up in the latest development snapshot (which is likely what you downloaded).
#17
Thanks very much arturoramos, changing the line fixed the problem.
I should have looked more closely at the iframe output I posted previously, then I would have realised earlier than I did where the problem lay. In the end I figured this was the line causing the problem but not being a coder was struggling to fix it.
Great module by the way, just what I needed for my Drupal based family history site. I will look forward to future releases.
#18
This problem all seems to arise from a pair of missing quotes around the username which would fail to log in any user with a space in their Drupal username. This issue has been fixed in version 2.0.
This issue is being closed.
#19
Installed Drupal 5.7 and TNG 6.2.0
Problem: TNG opens into Drupal IFrame however a "Login failed" results. Therefore Drupal does not automatically log the current Drupal user into TNG.
The following is reported
user warning: Unknown column 'UserID' in 'where clause' query: UPDATE users SET username = 'johnsonroots.com', password = 'XXX' WHERE UserID = 1 in /home/johnsonr/public_html/includes/database.mysql.inc on line 172.
#20
I'm using Drupal 6.13 and TNG Integrate 6.x-1.0-beta2. Everything is setup. TNG is a subfolder in Drupal named familytree. When a new user is created in Drupal, that user is not created in TNG. TNG and Drupal are located in the same database. Also, when I go to TNG and login, i receive a login failed messgae so the only way to get in is to request a new password. Any ideas?
Thanks
#21
I'm having same problem in Drupal 6.13. I updated the code but it was Line 137. Still no access as user or admin. I am also not accessing it within Drupal, my menu link is outside of Drupal. Everything is being followed per Read.me and the above details
thanks
J