1. devteam
  2. RO CSVI
  3. Friday, 18 September 2015
  4.  Subscribe via email
Hi,

I'm trying to combine three fields during import.

My Source fields are Year.Make,Model
My Target field is product_name

The rule is attached to the product_name field.

I don't see any change to product name when running the import

Here is the file I'm importing and the error log.

Hopefully you can point me in the right direction.

Thanks
Accepted Answer Pending Moderation
Hello,

My Source fields are Year.Make,Model
You have a dot between Year and Make, this should be a comma.

Can you post a screenshot of how you have setup your fields?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
Thanks Rolandd,

I corrected the mistake with the same result. Here is the newest log file and screenshot of my mapped fields. I connected the rule to the product_name field.
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

Can you please update to CSVI 6.1.2, just so you are up-to-date. Now I can't see in your screenshot the value in the column Your field, this must have the names of the field that you want to combine and the actual field should be set to combine. I get the idea you want to use the fields for their own values but also use it for creating the product_name, correct?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
First I want to say how great your support is. I'm amazed how quick and helpful you are. Thank you.

The Your Field column is blank because I'm mapping all fields. Does that makes sense?

I updated CSVI to 6.1.2 and the import broke. I update Available fields, recreated the template, and remapped the fields but it just says, "No supported fields have been found in the import file".

Here is the log...

Template_fields.png-2.zip
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
I see, I didn't have any Your Name fields set. I think if I had just defined the ones I needed for the Combine rule it would have worked. Unfortunately the CSVI update set me back to square one :(


I get the idea you want to use the fields for their own values but also use it for creating the product_name, correct?
I wanted to and successfully imported the tab-separated value file. The file had mostly custom header fields and I ended up skipping the header altogether and just relied on fields assigned to this template. Then I wanted to combine 3 fields and replace the product_name.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,

The Your Field column is blank because I'm mapping all fields. Does that makes sense?
That makes sense and not needed for a regular import but you are wanting to use the combine field, then this becomes important.

Let's take it from step 1, where you get the no supported fields found. This usually happens if the delimiters are not correct or the wrong import type is chosen. First step would be to check if the delimiters are set correct in the template. Also make sure your file is UTF-8.

In the template, the option Use column headers as configuration should be set to No because you want to use the template fields.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
That makes sense and not needed for a regular import but you are wanting to use the combine field, then this becomes important.

Yes, that makes sense to me now. Thanks

First step would be to check if the delimiters are set correct in the template. Also make sure your file is UTF-8.

I have the template delimiters set to t as per the instructions for tab-delimited fields. The file is save as ANSI and was working before updating. I also tried saving it as UTF-8 but it still gave me the No supported fields error.

In the template, the option Use column headers as configuration should be set to No because you want to use the template fields.

Use file for configuration is set to no. Skip first line is set to yes.
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
I did a test and changed the Use file for configuration option to yes and Skip first line to no and it appeared to recognize most of the import. I attached an image. I wonder why isn't having such a hard time when I just use the template fields?
Attachments (2)
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello,

Use file for configuration option to yes and Skip first line to no and it appeared to recognize most of the import.
In that case the columns in the file are used and that would explain why it recognized the majority of it, as some are unknown to CSVI.

I wonder why isn't having such a hard time when I just use the template fields?
I wonder as well. If you send me a private message with the Joomla and FTP login details I can take a look to see why it won't recognize them.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
In that case the columns in the file are used and that would explain why it recognized the majority of it, as some are unknown to CSVI.
Agreed :)


I wonder as well. If you send me a private message with the Joomla and FTP login details I can take a look to see why it won't recognize them.
I send the Joomla login info. I'm working on the FTP login.
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello,

On another site I ran into the exact same issue, and I think I found the root cause. If you open the file administrator/components/com_csvi/helper/importfields.php and after line 389 add this line:
$data->supported = 1;
save the file and you can give it a try to use the template fields, I believe it will work.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
If you open the file administrator/components/com_csvi/helper/importfields.php and after line 389 add this line:
$data->supported = 1;
save the file and you can give it a try to use the template fields, I believe it will work.

It worked! I'm getting this error but it doesn't seem to be preventing the import: Warning: Creating default object from empty value in /home/warner/public_html/administrator/components/com_csvi/helper/importfields.php on line 390

Now back to the import.
I get the idea you want to use the fields for their own values but also use it for creating the product_name, correct?

Yes. I'm using template fields for the import but I would also like to combine a few and replace one with the result. My source fields all have Your field values. The the target field is the same name as the template field where I want the combined fields to go.

I attached the rule to source and target fields but I can't seem to combine them.
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
I'm getting this error but it doesn't seem to be preventing the import: Warning: Creating default object from empty value in /home/warner/public_html/administrator/components/com_csvi/helper/importfields.php on line 390
You may want to check if the line was added after this line
$data = new JObject($field);
then it should not give the warning.

I attached the rule to source and target fields but I can't seem to combine them.
The rule should only be attached to the target field. However I think the issue is that you want one field to be used multiple times, as regular field and as a combine field. Usually you would set the field to type combine and this would be picked up. I am going to check if I can change the code so that you can do what you want to do and that is use a field for multiple purposes.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
You may want to check if the line was added after this line
$data = new JObject($field);
then it should not give the warning.
Yes! That fixed the error. Placing it after that line puts it around line 395 in my importfields.php file.


The rule should only be attached to the target field.

Okay. That is how the instructions are written and I did try that. I should have said I tried different combinations of placing it on target and source fields.


However I think the issue is that you want one field to be used multiple times, as regular field and as a combine field. Usually you would set the field to type combine and this would be picked up. I am going to check if I can change the code so that you can do what you want to do and that is use a field for multiple purposes.

Okay. Thank you so much Rolandd. I didn't realize that the Field Combine Plugin was designed to use field names set to combine. If you can give me the ability to both it would be much appreciated.
  1. more than a month ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
If you can give me the ability to both it would be much appreciated.
I am looking into it but it will take me a day or two as it is not a simple change.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
Hello,

As it turns out, I already coded this for the next release. Attached is the changed file, you can unpack this file and place it in the folder plugins/csvirules/fieldcombine. This is not a patch file, so you will need to do this manually.

To test the change, you should already see the change in the preview, you don't need to import the file to see the change.
Attachments (1)
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 16
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!