latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Importing content for serialized s2m field

Home Forums Community Forum Importing content for serialized s2m field

This topic contains 3 replies, has 1 voice. Last updated by  Jim Meyer 3 years, 3 months ago.

Topic Author Topic
Posted: Monday Sep 9th, 2013 at 2:24 am #59286
Jim Meyer
Username: robobrief

Can anyone spot the problem with the following extract of my csv file:

"a:5:{i:0;s:29:"Administrative and public law";i:1;s:13:"Children law";i:2;s:32:"Civil liberties and human rights";i:3;s:13:"Education law";i:4;s:14:"Regulatory law";}"

I have over 1,000 members but the import keeps failing to recognise this particular field. I did an export to get the general format of the csv right so I am pretty confident about that – I suspect I am missing something that is staring me in the face but I’ve been looking at this all day yesterday so I thought it might jump out for someone else. The possible values for the field have been set up in s2m as:

Administrative and public law|Administrative and public law
Advocacy|Advocacy
Agricultural law|Agricultural law
Aviation law|Aviation law
Banking law |Banking law 
Business affairs|Business affairs
Chancery|Chancery
Charity law|Charity law
Children law|Children law
Civil liberties and human rights|Civil liberties and human rights
Civil litigation|Civil litigation
Clinical negligence|Clinical negligence
Commercial litigation|Commercial litigation
Commercial property|Commercial property
Common law|Common law
Competition and Enterprise law|Competition and Enterprise law
Computer and IT law|Computer and IT law
Construction and civil engineering|Construction and civil engineering
Consumer problems|Consumer problems
Conveyancing residential|Conveyancing residential
Corporate finance|Corporate finance
Criminal law|Criminal law
Debt and money advice|Debt and money advice
Defamation law|Defamation law
Education law|Education law
Employment law|Employment law
Energy and natural resources|Energy and natural resources
Environmental law|Environmental law
EU law|EU law
Extraditional and mutual assistance|Extraditional and mutual assistance
Family law|Family law
Financial and investment services|Financial and investment services
Fraud|Fraud
Immigration law|Immigration law
Insolvency and bankruptcy|Insolvency and bankruptcy
Insurance law|Insurance law
Intellectual property law|Intellectual property law
International law (non EU)|International law (non EU)
Landlord and tenant - residential|Landlord and tenant - residential
Licensing law|Licensing law
Media and entertainment law|Media and entertainment law
Mediation - civil and commercial|Mediation - civil and commercial
Mediation - family|Mediation - family
Mental health and incapacity law|Mental health and incapacity law
Mergers and acquisitions|Mergers and acquisitions
Military law|Military law
Neighbour disputes|Neighbour disputes
Pensions law|Pensions law
Personal injury|Personal injury
Planning law|Planning law
Prison law|Prison law
Professional negligence|Professional negligence
Regulatory law|Regulatory law
Road traffic law|Road traffic law
Shipping law|Shipping law
Sports law|Sports law
Tax law|Tax law
Transport, road and rail|Transport, road and rail
Travel and tourism|Travel and tourism
Trust law|Trust law
Welfare benefits|Welfare benefits
Wills and probate|Wills and probate
  • This topic was modified 3 years, 4 months ago by  Jim Meyer.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Monday Sep 9th, 2013 at 5:54 pm #59326
Jim Meyer
Username: robobrief

bump

Posted: Thursday Sep 12th, 2013 at 5:02 am #59488
Jim Meyer
Username: robobrief

Just an update to add to the mystery (I realise I am a lone voice). Looking at the s2member import routine, it relies on the wordpress function “maybe_unserialize”. The odd thing is, looking at the data that is sorted in wp_usermeta after the import routine, the first &quote; is dropped and an additional one is added on to the end!

This is the field before importation:

“a:5:{i:0;s:29:Administrative and public law”;i:1;s:13:”Children law”;i:2;s:32:”Civil liberties and human rights”;i:3;s:13:”Education law”;i:4;s:14:”Regulatory law”;}”

This is it after:

“a:5:{i:0;s:29:Administrative and public law”;i:1;s:13:”Children law”;i:2;s:32:”Civil liberties and human rights”;i:3;s:13:”Education law”;i:4;s:14:”Regulatory law”;}”

Posted: Thursday Sep 12th, 2013 at 5:08 am #59490
Jim Meyer
Username: robobrief

OK. I have finally worked out the problem. It looks as though a serializised field should not be enclosed with quotation marks. If I’m right, I recommend the help document at http://www.s2member.com/kb/importing-updating-users/ is amended so that the example looks like:

...,a:3:{i:0;s:7:"Florida";i:1;s:7:"Georgia";i:2;s:6:"Alaska";},...
Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.