HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Need another set of eyes!

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#90945 (In Topic #18346)
Avatar

Community saint

Ok so I am trying to finish SMF2 Importer and when I run it I am getting a DB query error that says the email address cannot be NULL when it tries to add a new member. All of the rest of the member details are in the query fine fine except the email and I have triple times triple checked that the field name for email_address is correct for the SMF members table. And there are emails there.  If it picks up all the rest of the details from the table why does it not pick up the email address?????!!!!! This section of code is nearly identical to the SMF1 importer except that field names have changed (there are other changes tooo but not much before this portion of code in the import members part)

Please someone give me a clue if they think they might know why the email address is not getting picked up. Here is the page

Expand:

Back to the top
 
Posted
Rating:
#90950
Avatar

Community saint

When you create the record with ocf_make_member the email you use is $row['email_address'] yet I can't see it being set anywhere.

That means that the only place the error could be is in $rows=$db->query. Does that query actually return a email_address culumn?

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#90955
Avatar

Community saint

$rows=$db->query is selecting * from members table email_address is a field in that table (just like id_member and member_name and psswd etc that all get returned from that query.
Back to the top
 
Posted
Rating:
#90956
Avatar

Community saint

This is why it makes absolute no sense to me?!?! In fact that same query and that same make member function are exactly the same as in the SMF1 importer with the exception of some of the field names have changed slightly (email address is one of them) it used to be called emailAddress in SMF1 but the field name changed to email_address in SMF2  (others changed too like ID_MEMBER = id_member and memberName = member_name etc but all those fields return fine

it makes absolutely no sense to me. I want to throw my computer at the wall!! lol

I do like your trying to help though but I don't believe that is answer so if we can't figure it out can yu come over and help me smash my machine to bits? It's make us feel good! (Well for a few minutes anyway till I gotta go replace it).
Back to the top
 
Posted
Rating:
#90957
Avatar

Community saint

Just so you can see the error (and this is not a normal stack trace so this is a failed query execution cause it outputs at top of page above regular content of failure type) here is the error (there are other failures but they are based on the first one not working:

Expand:

Back to the top
 
Posted
Rating:
#90958
Avatar

Community saint

so you can see it is getting the username the password and salt etc but not the email???
Back to the top
 
Posted
Rating:
#90961
Avatar

Community saint

I looked at structure of SMF2 table to SMF1 and the only difference is email field in SMF1 is tinytext and SMF2 it is varchar (255) but I don't see how that could have anything to do with it?

This is baffling?!?!?
Back to the top
 
Posted
Rating:
#90963
Avatar

Community saint

Does is work at all for any records? I'm just wondering if it may be a data problem.

Although everyone should have an emal address it may have been removed after the user was created. Don't know if SMF would check for that after a user was created.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#90964
Avatar

Community saint

there are only 3 or 4 users created and they all have email address in the table. They all fail. I have optimized repaired tables and all to make sure it wasnt table corruption or something all to no avail.
Back to the top
 
Posted
Rating:
#90965
Avatar

Community saint

the fact that it grabs their name and password from the same table means the query works and is returning results but I don't see how it can't return the email?  Some of the fields like salt and birthdate and login date all come after the email field so how can it skip past that and grab them?
Back to the top
 
Posted
Rating:
#90967
Avatar

Community saint

Very long shot, but try loading the email into a variable first. i.e. $email=$row['email_address']; and then using $email in ocf_make_member.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#90968
Avatar

Are you sure SMF2 isn't allowing NULLs for the field? You'd need to check for null then convert to a blank string if it was, as ocPortal doesn't allow null.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90969
Avatar

Community saint

Ok so here is what I did so far (besides half a million other things last night)
I tried resaving the structure of the field. No Go

I added a logging routine right after the initial query to log keys and values returned from the query. It logs the key but has no value (for email address)
so I made a new folder and reinstalled smf2 into it with new db and all. Made some other fields filled in for users etc and tried again from this new installation (oh and I deleted several unused DB's that existed from old testing days of other CMS's - I did this before install too.)
I tried importing from this new version and again all the new profile fields I set up return with keys and values EXCEPT THE DAMN EMAIL!!!!! WTF?!?!? I am going nuts here! never seen anything like this before what could cause this???
Back to the top
 
Posted
Rating:
#90970
Avatar

Community saint

@chris email_adress is set to no for null in SMF and as well every user (of which I have 4) has an email address stored in the field in the DB.
Back to the top
 
Posted
Rating:
#90977
Avatar

Community saint

Here is SS of the section of table with email address and also the log file that is created right after the query of the keys and values returned from the query





Expand: 'The Log' 'The Log'

Back to the top
 
Posted
Rating:
#90978
Avatar

I'm thinking ;)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#90979
Avatar

Community saint

AHA I FIGURED  IT OUT!!!!!!
Back to the top
 
Posted
Rating:
#90980
Avatar

Community saint

its the dang banitems appended it has an email_address field!!!!!
Back to the top
 
Posted
Rating:
#90982
Avatar

Community saint

ban_items is LEFT joined and the users arent banned so that email address is being returned in place!
Back to the top
 
Posted
Rating:
#90983
Avatar

My guess now is ban_items has an email address field, taking precedence in the query results.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Expand