Support forums

Please check @brandnewbox_uk for support status updates.

Search     Advanced Search
Import multiple tags using comma separated values for “Tag"Solspace Field Type  
Posted: 29 January 2016 03:45 AM —  
Newbie
Rank
Total Posts:  5
Joined  2015-07-02

Hello.

I am using EE 2.8.1 with DataGrab 1.9.2 (grabbed today from Devotee) and Tag 4.2.7

Does DataGrab support Solspace Field Type?

My data looks like this:

<tags>Value01, Value02, Value03</tags>

To which I am hoping can be imported as separate tags.

Is this possible?

Currently it is importing as a long single tag including the commas: Value01, Value02, Value03

Thanks.

Profile
 
Posted: 19 February 2016 04:02 AM —   [ # 1 ]  
Newbie
Rank
Total Posts:  4
Joined  2016-02-18

I am using EE 3.1.2 and DataGrab 2.0.0.

DataGrab 2 didn’t have a solspace tag field type, so I copied the one from 1.9.2, made a small change and it worked.

Do you want me to post my changes? I think it will work in EE2 as well.

Profile
 
Posted: 19 February 2016 04:23 AM —   [ # 2 ]  
Newbie
Rank
Total Posts:  5
Joined  2015-07-02

Absolutely.
I am not using EE 3 yet, but is sure to be useful to someone.
Thanks.
=)

Profile
 
Posted: 03 October 2016 06:03 PM —   [ # 3 ]  
Newbie
Rank
Total Posts:  7
Joined  2016-10-03

Hello, we are trying to do the exact same thing here exporting tags in an XML and importing them.
My data also looks like this:

<tags>Value01, Value02, Value03</tags>

We are using EE 2.11.1 and Datagrab 1.8.0 and would like to import them as separate tags. Currently they are importing as one long tag.

It would be very helpful if you could post the changes you made and we can see if they work on EE2 also! Thanks much.

Profile
 
Posted: 23 September 2017 03:09 PM —   [ # 4 ]  
Newbie
Rank
Total Posts:  8
Joined  2017-09-02

I am using EE3x and DataGrab 2.0, and I would love to have this code! I am also trying to import multiple tags from SolSpace Tag from an EE2 installation into an EE3 installation.

absolut - 19 February 2016 04:02 AM

I am using EE 3.1.2 and DataGrab 2.0.0.

DataGrab 2 didn’t have a solspace tag field type, so I copied the one from 1.9.2, made a small change and it worked.

Do you want me to post my changes? I think it will work in EE2 as well.

Profile
 
Posted: 12 October 2017 03:07 AM —   [ # 5 ]  
Newbie
Rank
Total Posts:  4
Joined  2016-02-18

I’m so sorry guys, I forgot to post here.

You need to change the file /ajw_datagrab/fieldtypes/datagrab_tag.php

Find and delete the following lines (lines 23-28)

while( $subitem = $DG->datatype->get_sub_item( 
 $item, $DG->settings["cf"][ $field ], $DG->settings, $field ) ) {

  $tags[] = $subitem;

 }

and replace it with

$tags = explode(",", $DG->datatype->get_sub_item( 
     $item, $DG->settings["cf"][ $field ], $DG->settings, $field ));

That should do it! Please test to make sure it works for you.

Profile
 
Posted: 15 October 2017 01:42 PM —   [ # 6 ]  
Newbie
Rank
Total Posts:  8
Joined  2017-09-02

Thanks!! I’ll try this out and report back.

EDIT: That works!! EE version 3.5.x, DataGrab version 2.0.2

Profile
 

‹‹ Always updates an entry, even with different duplicate check field      Json import fail ››

Select A Theme