I created a CVS data source asset and uploaded a CSV file. Unfortunately when using the CSV keywords to display content on the front end, the keyword, not the filed from the CSV file that the keyword was referencing was displayed. I thought maybe this was because some of the fields that became keywords ended in ? so maybe it would break the keyword.
Anyway, to test this, I edited the CSV file and removed the ? from the end of some of the fields and re-uploaded the CSV file. From then on, I got the PHP Notice Undefined offset: 36 and PHP Notice Undefined offset: 37 and couldn't get into the details screen for the asset any more. I trashed the asset and started again but got the same results. (see attached file)
I thought that maybe re-uploading the CSV file with slightly different filed lengths might have confused the system, so I tried the same thing in our test environment: I created a CSV data source asset and uploaded the edited CSV file for the first time and got this same error. Again I couldn't access the details screen of the data source asset.
What's happened? Was it the ? that broke the keyword in the first instance?
Here is an example of the original keywords that didn't display correctly:
%data_source_record_set_3.1.1_are_there_ways_that_the_opt_out_structure_of_the_scheme_could_be_improved?%
Thanks,
Richard
[quote]
What's happened? Was it the ? that broke the keyword in the first instance?
Here is an example of the original keywords that didn't display correctly:
%data_source_record_set_3.1.1_are_there_ways_that_the_opt_out_structure_of_the_scheme_could_be_improved?%
[/quote]
I'm not sure at the moment as the attachment didn't seem to come through. I wouldn't expect the question mark to cause a problem. It appears that there is a space at the end of the keyword however this doesn't come through in my forum reply. If the space is present, perhaps this is causing some issues.
Changing the column headers shouldn't confuse the Data Source as this data should be reparsed and reloaded upon commit.
If this can be replicated with a simple file, please lodge a Bug Report detailing the code files in which the PHP Notice appears, a CSV example, and the Matrix version used and we'll take a look.
[quote]
I'm not sure at the moment as the attachment didn't seem to come through. I wouldn't expect the question mark to cause a problem. It appears that there is a space at the end of the keyword however this doesn't come through in my forum reply. If the space is present, perhaps this is causing some issues.
[/quote]
Thanks Mark, Here's another attachment with a message that comes up when trying to open the children of the CSV data source asset.
php notice.JPG (45.8 KB)
[quote]
Thanks Mark, Here's another attachment with a message that comes up when trying to open the children of the CSV data source asset.
[/quote]
While not going into the code, the indicies might refer to column numbers. Are there at least 37 columns in the CSV file? If so perhaps narrowing the file down to these columns might get to the root cause.
If you would like us to investigate this on your system to determine whether it is an issue regarding the file supplied or a more generic bug, please lodge a ticket with Squiz Support.
[quote]
While not going into the code, the indicies might refer to column numbers. Are there at least 37 columns in the CSV file? If so perhaps narrowing the file down to these columns might get to the root cause.
[/quote]
Thanks Mark. There are 36 columns in the CSV file. I tried cutting and pasting just the first 36 columns into another CSV file and it uploaded fine. Maybe there was some hidden corrupt code in columns 36 to 38.
I've been able to upload other CSV files with no problems, so I don't think its a generic bug with CSV files.