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.


Error with "Import member spreadsheet (CSV)" tool

Login / Search

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

Community saint

Greetings,
For the site I'm building, I will create all the member accounts myself and then invite the people to log in. I created a group of custom profile fields. I exported the member profiles from another database I have and I want to import them all at once into ocPortal, matching the fields from the other database with the fields in ocPortal. I tried to import a test CSV file for the first time today. I uploaded the .csv file and chose a default password, but then got this error message after clicking Proceed button:

Unfortunately a query has failed [SELECT url_to FROM saiva_image_url_sub_for WHERE (url_from='uploads/incoming/4d673422225ad.dat' AND member_id=2) ORDER BY expire DESC LIMIT 1] [Table 'saiva.saiva_image_url_sub_for' doesn't exist] (version: 5.0.3, PHP version: 5.3.5, URL: /adminzone/index.php?page=admin_ocf_join&type=_import_csv).

Does anyone know what this means and how to fix?
Back to the top
 
Posted
Rating:
#66852
Avatar

Hi Rishi,

I think you just need to open up this URL:
http://yourbaseurl/data_custom/aviary_install.php.

You've installed the Aviary addon, and on this version of ocPortal the install URL needs calling up manually due to a bug.


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:
#66863
Avatar

Community saint

Thanks for the quick reply, Chris. Wow, I never would have figured this as the obstacle. That fixed it, thank you! Really appreciate the ability to import spreadsheet, which will save lots of time.
Back to the top
 
Posted
Rating:
#66872
Avatar

Community saint

Hello Chris,
So far it looks like I cannot map a usergroup field from my other database into the ocPortal "Primary usergroup" field when importing the CSV file. Is that true?
Back to the top
 
Posted
Rating:
#66881
Avatar

Hi,

I just checked the code and it looks at the name of the usergroup in the "Usergroup" field. If it exists in ocPortal then it maps to it, otherwise it makes it and puts out a note saying it did so.

If you're not sure what fields ocPortal recognises in the CSV btw, you can do an CSV export, wipe the rows, and use that as a template for import.


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:
#66892
Avatar

Community saint

Hello,
Thank you, that was helpful. I got the Usergroup to map over. However after several tests I haven't been able to get the email addresses mapped over. I double checked and triple checked that I had hand the "E-mail address" field named correctly, and it still didn't work. Might be a bug.
Back to the top
 
Posted
Rating:
#66894
Avatar

Community saint

Also I'm trying to figure out what format to export birth dates from my other database so it will map properly. Although ocPortal CSV export shows that as one column with name "Date of birth", it looks like it might be three separate fields
Back to the top
 
Posted
Rating:
#66897
Avatar

Ah yes, there is a bug in v5 regarding email addresses. It needs to be 'Email' for it to work.

DOB's are put in as YYYY/MM/DD.


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:
#66910
Avatar

Community saint

Okay, one down, one to go! The Email mapping is working now, but the Date of birth didn't map yet. I formatted the field just like you said (YYYY/MM/DD) and entered the field title as "Date of birth" which is what the CSV export showed, but it still didn't map over. (I also tried "DOB" as the field title but that didn't work either.) The date I tried was "1956/08/11"


Last edit: by Rishi Saravanan
Back to the top
 
Posted
Rating:
#66915
Avatar

A couple of possibilities…

  1. By default, "Reveal age" is set to "No". You can add a new column with "Yes" for this.
  2. Spreadsheets are likely to try and detect the YYYY/MM/DD format (ISO standard international date notation) as dates, store it in internal date format and output it back into US format. You may need to tell the software the cells are text to stop it interpreting them.

If these possibilities fail could you attach a test CSV that illustrates the problem please? I'm happy to look into that.


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:
#66920
Avatar

Community saint

  1. I set "Reveal age" to Yes and that got the box ticked but still didn't map the birth date over
  2. Inside the Excel spreadsheet (which first outputs from my other database as tab delimited) I told the cell to use a custom format of YYYY/MM/DD. I then saved the file as CSV. If I then open the file in BBEdit, the date still looks fine (1956/08/11). The file is attached. Thank you
    Attachment
    » Download: profile field titles.csv (285 Bytes, 29 downloads so far)
    .
(If you go and open this attached file in Excel, Excel will automatically change the custom format back to US date format. But if you open it in BBEdit or another editor, it will stay as YYYY/MM/DD. I made sure to import to ocPortal while it was still this way.)


Last edit: by Rishi Saravanan
Back to the top
 
Posted
Rating:
#66935
Avatar

I believe the attached file will fix the problem.

Attachment
adminzone/pages/modules/admin_ocf_join.php
» Download: admin_ocf_join.php (31 Kb, 135 downloads so far)


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:
#66945
Avatar

Community saint

Thank you! Yes, the file fixed the problem and the birth date maps over now. Forgive me for not having any experience yet with standard upgrade processes, but I presume this php file will be included in v6 so that it doesn't get overwritten when I upgrade?

One more thing for you to know about the "Email" mapping bug in v5– although I can now map the email address into the official field as noted above, I just noticed that it also creates a new custom profile field called "Email" and duplicates the address there. Again I presume this will all be fixed in v6.
Back to the top
 
Posted
Rating:
#66957
Avatar

I presume this php file will be included in v6 so that it doesn't get overwritten when I upgrade?

Yes, all bug fixes get rolled into the next release.

One more thing for you to know about the "Email" mapping bug in v5- although I can now map the email address into the official field as noted above, I just noticed that it also creates a new custom profile field called "Email" and duplicates the address there. Again I presume this will all be fixed in v6.

I wasn't aware of this one, but now that I am – a fix is ready and will be included.
For now the easiest thing is probably just to delete that phantom CPF.

Thanks for your patience.


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
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: