ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Geting PHP errors when I try to use member import

February 18, 2012 7:51pm

Subscribe [3]
  • #1 / Feb 18, 2012 7:51pm

    kokako

    57 posts

    Loading my .csv for “Convert delimited text to XML” I get:

    A PHP Error was encountered
    Severity: Notice
    Message: Undefined index: index
    Filename: libraries/Menu.php
    Line Number: 1051
    A PHP Error was encountered
    Severity: Warning
    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)
    Filename: core/Common.php
    Line Number: 409

    It still lets me match up all the fields, but then when I try to export the .xml file I get (showing the xml results in he browser does not give errors though…):

    A PHP Error was encountered

    Severity: Notice

    Message: Undefined index: index

    Filename: libraries/Menu.php

    Line Number: 1051

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 86

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 87

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 88

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 89

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 90

    A PHP Error was encountered

    Severity: Warning

    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)

    Filename: helpers/download_helper.php

    Line Number: 91

     

     

  • #2 / Feb 19, 2012 3:40am

    kokako

    57 posts

    ok so I bravely trudged on, and decided to roll my own SQL. Once I massaged my data and got a good xml file, I tried to import it and recived the following errors:

    A PHP Error was encountered
    
    Severity: Notice
    
    Message: Undefined index: index
    
    Filename: libraries/Menu.php
    
    Line Number: 1051
    
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)
    
    Filename: libraries/Functions.php
    
    Line Number: 767
    
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /_WWW/EEtest/system/codeigniter/system/core/Exceptions.php:170)
    
    Filename: libraries/Functions.php
    
    Line Number: 393


    BUT all of the accounts were imported fine.

    I am using Apache/2.0.63 (Unix) PHP/5.2.13 DAV/2 MySQL client version: 5.1.44

     


    For those interested making your own XML file was easy to do:

    -had an external membership DB from another CMS in mySQL

    -Mapped account DB fields to required EE fields. these are username, screen_name & Email

    -Then I used Sequel Pro.app to export the table as XML, plain schema, NULL values as ’ ‘

    -Then in your text editor, replace every <row> with <member>, every </row> with </member>

    -you will also have an opening tag <your_DB_name> and <your_table_name>. Remove the DB tag and its closing mate and chnage the table tags to <members> and its mate to </members>

    -lastly, if you are importing passwords,  you need to set the type of each password tag, in my case it was to change every

     to 

    see: http://ellislab.com/expressionengine/user-guide/cp/tools/utilities/member_import/member_xml_format.html

  • #3 / Feb 20, 2012 12:41pm

    Sean C. Smith

    3818 posts

    Hi Kokako,

    I’m sorry that you had trouble with member imports. Just to confirm, all of your members have successfully and completely imported despite the errors reported in the second post above?

    Also thank you for letting others know how you created your own xml file - I’m sure that will be very beneficial to others searching this thread in the future.

    Sean

  • #4 / Feb 20, 2012 1:24pm

    kokako

    57 posts

    Yes every record was imported, I tested an account, password worked.

    Makes me think that it’s an php version issue. Especially “Message: Cannot modify header information”. Maybe something to do with the ability to generate the downloadable XML file…

    Perhaps this thread should be moved to bug reports?

    I’ll try to add the XML info as a wiki.

  • #5 / Feb 23, 2012 5:11pm

    luke holder

    71 posts

    I am also getting this error when importing members:

    screenshot:
    http://d.pr/7KPi

    this is also affecting the outputted xml:
    screenshot: http://d.pr/ASET

    I thought maybe it was a limit thing (I had 1100 to import) but i split it into a smaller file of 200 members to test and it still errored.

    the file is being but off as a part of this error:
    screenshot: http://d.pr/ofNB

    thanks…

  • #6 / Feb 23, 2012 6:03pm

    kokako

    57 posts

    Luke: if I were you I’d skip the whole convert to XML feature of EE.. It’s much cleaner to go from mySQL to XML using Sequel Pro.app ( you don’t need to worry about escaping things).

  • #7 / Feb 23, 2012 6:07pm

    luke holder

    71 posts

    This error is fixed with the following fix from the bug report. https://support.ellislab.com/bugs/detail/16747/#13190

    i made the fix and the error and conversion is gone.

    kokako, I do not have a database to work with, only csv files

    I did have to fix up the csv with this ruby script i made

    require 'csv'
    
    file = "Practitioners.csv"
    outcsv = CSV.parse(File.read(file))
    
    [0..500,501..1000,1001..1500].each do |range|
     outcsv.slice(range).each_with_index do |row|
      CSV.open("Practitioners-new-#{range}.csv", "a", {force_quotes: true}) do |csv|
       csv << row
      end
     end
    end
  • #8 / Feb 23, 2012 6:14pm

    kokako

    57 posts

    Luke: Good find!

  • #9 / Feb 24, 2012 10:49am

    Shane Eckert

    7174 posts

    Hello kokako,

    Did the fix on the bug page get you moving along again?

    Is there is anything else I can do to help?

    Nice find Luke.

    Cheers,

  • #10 / Feb 26, 2012 5:13am

    kokako

    57 posts

    I did not try the fix, as I write above I got all the accounts in. the error was not a ‘show stopper’


    Is this an official bug then?

  • #11 / Feb 27, 2012 2:00pm

    Dan Decker

    7338 posts

    Hi kokako,

    The bug was reported in version 2.3.0, and the fix should be in 2.4

    What version of ExpressionEngine did you see the errors with?

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases