Any plans for a Drupal 7 port?

CommentFileSizeAuthor
#7 d7-port-1329396-7.patch19.39 KBdsdeiz

Comments

jason.fisher’s picture

+1

gaxze’s picture

would be nice!

saltednut’s picture

Working on this for a client right now and will post a patch when finished.

bjmac’s picture

Can you provide an update on when the D7 port/patch can be expected?

saltednut’s picture

Unfortunately the client has held off with ATS Login Web Service being a pricy config on their iMIS end. I did some basic work (less than an hour) migrating the module's menu code and hooks to D7. A lot of the code is anon functions that depend on iMIS. Feel free to assign to yourself if you have access to ATS Login Web Service working on an iMIS install. Afraid I can't be much help for this at this time.

jharder’s picture

I have been using this module with a Drupal 6 site for a while. A new project has come up for my organization and I am building the site in D7 so I am working on porting this module over. At this point, I'm probably about 80% there but an error keeps coming up that I could use some help with...

It appears that the xml being returned from our webservice does not contain a mail parameter. When I attempt to log in, this error is returned:

PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'mail' at row 1: INSERT INTO {users} (uid, name, pass, mail, created, access, status, init) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7); Array ( [:db_insert_placeholder_0] => 42 [:db_insert_placeholder_1] => harderj1@msu.edu [:db_insert_placeholder_2] => $S$DsoFsge.SNRRReVZCuZ1EVsAfqu/.KsYg5QOe0ePvlRumSc3melH

 [:db_insert_placeholder_3] => ncoding="utf-8"?> <LoginResultsWithData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.atsol.org/LoginWebService/"> <ResultCode>0</ResultCode> <ResultMessage>Success</ResultMessage> <ID>16614</ID> <InstituteContactId>13598</InstituteContactId> <IsMember>true</IsMember> <IsInstitute>false</IsInstitute> <CustomerTypeCode>STAFF</CustomerTypeCode> <BillingCategory /> <ContactStatusCode>A</ContactStatusCode> <PaidThruDate>0001-01-01T00:00:00</PaidThruDate> <FullName>Jeremy Harder</FullName> <FirstName>Jeremy</FirstName> <Informal>Jeremy</Informal> </ 

[:db_insert_placeholder_4] => 1340199556 [:db_insert_placeholder_5] => 1340199557 [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => harderj1@msu.edu ) in drupal_write_record() (line 7013 of C:\wamp2\www\maisa\includes\common.inc).

Where it says [:db_insert_placeholder_3] is where imis auth is trying to parse the email address, by looking in the xml for the tag pair:<Email></Email>

Here is what the webservice is returning:

<?xml version="1.0" encoding="utf-8"?>

<LoginResultsWithData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.atsol.org/LoginWebService/">

  <ResultCode>0</ResultCode>

  <ResultMessage>Success</ResultMessage>

  <ID>16614</ID>

  <InstituteContactId>13598</InstituteContactId>

  <IsMember>true</IsMember>

  <IsInstitute>false</IsInstitute>

  <CustomerTypeCode>STAFF</CustomerTypeCode>

  <BillingCategory />

  <ContactStatusCode>A</ContactStatusCode>

  <PaidThruDate>0001-01-01T00:00:00</PaidThruDate>

  <FullName>Jeremy Harder</FullName>

  <FirstName>Jeremy</FirstName>

  <Informal>Jeremy</Informal>

</LoginResultsWithData>

See? No email tags. This is actually a problem we had with the D6 version anyway so it's not a porting issue. My guess is it's a problem with the webservice. I contacted ATS about it once but they did not offer any support.

dsdeiz’s picture

StatusFileSize
new19.39 KB

Hi, we've ported it to D7. Was having the same problem like jharder where Email isn't part of the response from the service. But not entirely necessary when creating a new user. I made the email address field in the user profile form accessible when the response from the service for Email is empty and just added a description under the email address field:

...by e-mail. This will not update your iMIS account's email address.

Also, I'm not sure if there is any purpose of allowing registration. User may be able to register but couldn't login since imis_auth replaces the validation. Not sure what's the best way to approach this. Perhaps adding the newly created user to the exempted users list.

dsdeiz’s picture

Status: Active » Needs review

Changed status.

kbahey’s picture

@dsdeiz

You are now a co-maintainer. You can commit to git, and you can create releases.

Please be responsible and try to maintain backward compatibility, or at least an upgrade path for existing users.

Also, resist the urge to overcomplicate the code or feature creep.

Simple is better.

dsdeiz’s picture

D7 version is now available on Git. Feel free to test! Will mark this ticket fixed once I get to roll out a beta version. Thanks!

dsdeiz’s picture

Status: Needs review » Closed (fixed)

D7 is now available for beta. As always, feel free to test. Thanks!

jharder’s picture

Version: 6.x-1.x-dev » 7.x-1.0-beta2

Has anyone found a way to get the email address imported properly from imis? I have been talking with ATS about it again. There was an update made to the webservice files that was supposed to correct the email issue. So far the new files aren't working for me, though. It returns a http 500 error when I try to use the files provided by ATS. ATS thinks it's a permissions problem on our imis server, but as far as I can tell all permissions were set identical to permissions on the old, non-error producing version.

Not getting a proper email address into imis is a big issue if you're trying to send newsletters or other communications to website users.

dsdeiz’s picture

Hi,

There was an update made to the webservice files that was supposed to correct the email issue. So far the new files aren't working for me, though.

Not sure I'm understanding this correctly, but I'm guessing you're referring to the new webservice files and not the module? Have you tried manually testing it through http://yourdomain.com/file.asmx?op=[ValidateLoginWithData or ValidateLogin]? I don't have new updates on the service yet so I haven't tried.

Thanks