Experts, please! SOS!
Permalink
I am using Data Display Package in my site being rebuilt with c5 5.4.0.5. I have to import form data using the import facility in the Data Display Package. But it is not happening. I get the following message:
Warning: Cannot modify header information - headers already sent by (output started at /home2/normacoi/public_html/localica/packages/datadisplay/controllers/dashboard/datadisplay/import.php:40) in /home2/normacoi/public_html/localica/concrete/libraries/view.php on line 758.
I wrote to the developer, but i have not received any reply. If any expert who can kindly look into it and escape us from this situation, we request attention, please.
Warning: Cannot modify header information - headers already sent by (output started at /home2/normacoi/public_html/localica/packages/datadisplay/controllers/dashboard/datadisplay/import.php:40) in /home2/normacoi/public_html/localica/concrete/libraries/view.php on line 758.
I wrote to the developer, but i have not received any reply. If any expert who can kindly look into it and escape us from this situation, we request attention, please.
I really like the Data Display package, but I have not found a way to import the raw data. I think that Data Display only imports XML files to define data tables (forms), list templates, and detail templates.
I would NOT recommend this, but you can get around this by adding to the MySql tables directly.
1. Define your form in Data Display (that you CAN import; you need to have the xml file on your local machine).
2. Look at the MySql table btFormQuestions to find the question msqID values that correspond to your data.
3. You need to import your raw data into btFormAnswers make one row for each field and giving each entry a answer set id number(asId) that will keep all the answers grouped together. Your MySql will look something like this:
[text]
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '42', 'Antique Power magazine', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '43', 'http://www.antiquepower.com/', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '44', '2', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '42', 'Antique Tractor Internet Services', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '43', 'http://www.atis.net/', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '44', '3', '')
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '42', 'Country Life & Power Show (Waukee, IA)', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '43', 'http://www.centralhawkeye.org/powershow.php', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '44', '4', '');
[/text]
Be careful! You need to find the largest asId in the table btFormAnswerSet. Start your new asID at 1 + the largest number you find there.
4. Your data still will not show up. You need to add one record for each answer set to btFormAnswerSet. To do this you need to find the form questionSetId in the table btFormQuestions. Continuing with my example above, I would need to do something like this:
[text]
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
[/text]
You see that I had three sets of answers, so I needed to add three records to btFormAnswerSet. Auto-increment took care of getting the correct asId for me.
Like I said, I don't recommend this! But if you hate data entry as much as I do...
I would NOT recommend this, but you can get around this by adding to the MySql tables directly.
1. Define your form in Data Display (that you CAN import; you need to have the xml file on your local machine).
2. Look at the MySql table btFormQuestions to find the question msqID values that correspond to your data.
3. You need to import your raw data into btFormAnswers make one row for each field and giving each entry a answer set id number(asId) that will keep all the answers grouped together. Your MySql will look something like this:
[text]
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '42', 'Antique Power magazine', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '43', 'http://www.antiquepower.com/', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('34', '44', '2', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '42', 'Antique Tractor Internet Services', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '43', 'http://www.atis.net/', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('35', '44', '3', '')
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '42', 'Country Life & Power Show (Waukee, IA)', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '43', 'http://www.centralhawkeye.org/powershow.php', '');
INSERT INTO btFormAnswers (`asID`, `msqID`, `answer`, `answerLong`) VALUES ('36', '44', '4', '');
[/text]
Be careful! You need to find the largest asId in the table btFormAnswerSet. Start your new asID at 1 + the largest number you find there.
4. Your data still will not show up. You need to add one record for each answer set to btFormAnswerSet. To do this you need to find the form questionSetId in the table btFormQuestions. Continuing with my example above, I would need to do something like this:
[text]
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
INSERT INTO btFormAnswerSet (`questionSetId`) VALUES ('1272390883');
[/text]
You see that I had three sets of answers, so I needed to add three records to btFormAnswerSet. Auto-increment took care of getting the correct asId for me.
Like I said, I don't recommend this! But if you hate data entry as much as I do...
And I think, if there's also some code before the session/instance is loaded.
I don't know if that could help, but maybe a start ?