1. rusasadmins
  2. RO CSVI
  3. Monday, 10 June 2019
  4.  Subscribe via email
Is it possible to UPDATE content with an import file?

1. if I provided an import file with 3 fields and one of the fields included the unique username, which was also a field in the article (unique), could I use it to update other fields in the table?

For example:
Import File:
First Name
Last Name
Phone Number
User Name

In the ARTICLEs I have fields:
First Name, Last Name, Phone Number, user Name

Could I UPDATE these records on the import?

2. If my import file included:
User Group
User Name

Could I 'import' into the user table, but only UPDATE the data and adjust the 'group' that the person is assigned to?

thanks,
Laura
Accepted Answer Pending Moderation
Hello Laura,

Users are updated based on their emailaddress. If the emailaddress exists, the user is updated, if the emailaddress does not exist the user is added unless you have set the option Skip new items to Yes.

To update user groups you would need 2 fields minimal:

  • email

  • usergroup_name or usergroup_path



You would use the usegroup_path if you have a nested structure for your user groups like:
Location A/Dayworkers
Location B/Dayworkers

If you would only specify Dayworkers, CSVI would not know which group you meant.
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
How about updating Joomla ARTICLES?

thanks,
Laura
  1. 2 weeks ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello Laura,
1. if I provided an import file with 3 fields and one of the fields included the unique username, which was also a field in the article (unique), could I use it to update other fields in the table?

For example:
Import File:
First Name
Last Name
Phone Number
User Name

In the ARTICLEs I have fields:
First Name, Last Name, Phone Number, user Name

Could I UPDATE these records on the import?

For regular Joomla content import, title or alias and catid or category_path are the needed fields. Since you do not have those fields you cannot update these fields using regular content import. How are these fields stored in database? Are these Joomla custom fields for Articles?
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Actually,
I could 'provide' the article title and the article id even in my view...

If I did and the article id already existed, would it be able to update the 'custom fields'?

I would do this as a different template, and I would just include 'people' that already exist. People are 'articles' in the system.

thanks,
-- Laura
  1. 2 weeks ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hello Laura,
If I did and the article id already existed, would it be able to update the 'custom fields'?

Yes you can update the custom fields for existing articles. You can either provide article id or title/alias and catid/category_path fields in your import. With these fields RO CSVI will check if there is any matching article and update the custom fields else a new article will be created with custom fields.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
When I created my fieldmapper list, I don't see an option for the Article id? I see title, catid, but not article id...

So when I ran my template, it didn't 'find' the article, and added a new one...

I uploaded my 'field mapper list'...

When I created the field mapper, since there is no ID, it's not 'matching up'...I selected to 'skip' the id...

Screen Shot 2019-11-22 at 9.58.13 AM.png

thanks,
Laura
Attachments (2)
  1. 2 weeks ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Ok, forget my last post... I figured it out...

using this documentation: https://rolandd.com/documentation/ro-csvi/joomla-content/joomla-content#import

I changed my view to include
- alias
- category_path

And it worked beautifully!!!

Now I'm going to create a view to change the custom fields and see how that works.

Last question, how about TAGS? If I need to update the tags, but SOME tags I want to keep? I assume I have to do that manually?

Because I'm using TAGS to determine 'groups' people are assigned to, and that doesn't come in the import.

thanks,
Laura
  1. 2 weeks ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Great news...

I was able to update:
- users
- content

Thank you!

I think for TAGS I will have to do this manually... because as I said above, I need to KEEP some of the tags, based on the path structure, but other tags, I need to remove...

So for example the tags that are within 'PEOPLE', those I have to replace from my feed...

but the other tags... I need to KEEP, because those are set in joomla
  1. 2 weeks ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hello Laura,
So for example the tags that are within 'PEOPLE', those I have to replace from my feed...

but the other tags... I need to KEEP, because those are set in joomla

For replacing tags, you can delete those specific tags you need to replace using tag_delete with value set to Y. You can then import new tags. These tags can be then used in Joomla content import.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
If I set tag_delete, will it delete ALL of the tags?

I do NOT want to remove ALL tags, I just want to remove specific ones...

For example...

I have a tag hierarchy for 'research groups', this determines the research groups they are in... these tags I do NOT want to delete...because they change them in Joomla.

I also have a tag hierarchy for PEOPLE, THIS I want to REPLACE (because my import file tells me where to 'put people', into specific areas of the site.

thanks,
Laura
  1. 2 weeks ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Hello Laura,
If I set tag_delete, will it delete ALL of the tags?

This will delete only the tags you have set value as Y and not all the tags.

I have a tag hierarchy for 'research groups', this determines the research groups they are in... these tags I do NOT want to delete...because they change them in Joomla.

If you do not want to delete a tag set tag_delete as N for that particular row in your import file.


I also have a tag hierarchy for PEOPLE, THIS I want to REPLACE (because my import file tells me where to 'put people', into specific areas of the site.

When deleting a tag RO CSVI looks for its path and alias. So you need to set these fields in your import file along with tag_delete set to Y. For example if you want to delete a child tag which is under parent tag. You need to set path as parent-tag/child-tag and alias as child-tag and tag_delete as Y. Remember all these can be done with Joomla tag import operation.

Let me know if you need any more clarification.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 2 weeks ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
Tharuna,
Hi, here is the situation, my import is an import for CONTENT/ARTICLE

My CONTENT HAS THIS: already stored in the database
Jane is in the tag of professors and ptl and research group of engineering

article-alias tags
Jane . People/Faculty/Professors|People/Faculty/PTL|Research-Group/Engineering

If now, when I update Jane I want the tags to be: (I get this from my feed)

article-alias . tags
Jane . People/GraduateStudents

BUT I want to keep her in the Research-Group/Enginnering
I want to REMOVE her from People/Faculty/Professors|People/Faculty/PTL

You see Research-group/engineering is a tag that we assign in Joomla, it does not come from an outside feed.

What will happen?

thanks,
Laura
  1. one week ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello Laura,

This is a complex situation. The main problem is, the tag(s) to be removed is not in the import file so RO CSVI has no clue to remove these tags. From the point of view of RO CSVI, tags are just tags, whether they come in via a feed or are added via Joomla.

The basic question is, how would the system know which tags to delete?

There doesn't happen to be a feed that lists which tags has been removed from an entity?
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 13
Accepted Answer Pending Moderation
I COULD give you the 'list' of the tags that I would WANT to be removed, as I know the exact paths for those tags.

I can either:
1. give a list of tags for that specific article that should be removed (I can include the paths, ids, etc)
2. give a list of all tags (even if they are not for that specific article) that need to be removed

THEN I can give or include another field for the tags to be ADDED.

let me know what you think would make the most sense.

I just can't have all of the tags removed, since some tags are being modified locally in joomla.

thanks,
Laura
  1. one week ago
  2. RO CSVI
  3. # 14
Accepted Answer Pending Moderation
Hello Laura,
I COULD give you the 'list' of the tags that I would WANT to be removed, as I know the exact paths for those tags.

If you know the tags then you can create a CSV file with alias, path and tag_delete field set to Y and use Joomla tags import to remove these tags. By doing this import the relation between the deleted tag and the article is also removed. You can then add the new tag to the articles using Joomla content import.

THEN I can give or include another field for the tags to be ADDED.

You can add new tags to the same CSV file in the above import without setting any value to tag_delete field. RO CSVI will add these new tags.

I just can't have all of the tags removed, since some tags are being modified locally in joomla.

You don't have to remove all tags. Just add the tags to be removed and tags to be added in same import file. You can manage your tags using Joomla tags import template.

You need to do two import here, one is for managing your tags and the other is Joomla content import as you are doing now to link the tags to your articles.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. one week ago
  2. RO CSVI
  3. # 15
Accepted Answer Pending Moderation
I think I found a small issue with my 'tag updates'...

So to do this right, let me give you background...

I have a FEED that will have the 'most current' tags that a person should be assinged to
I want to store a FIELD as an extra custom field with the 'current version of tags stored'
This way I can compare them to see IF tags need to be updated, and I can use the 'current tags' to be used to define which tags to DELETE. (as I don't want to delete all tags).

I thought that by using a custom field, I could use that as a 'backup' of what someone is assigned, and I don't have to 'flatten the data'.

BUT, when I put data in the custom fields, since a '|' was used, your system inserted it as 2 records in the fields table...

Here is my example...

My import view to the custom field that I call - originaltags
1. Import I use:

1447 Martin, Richard richard-martin rmartin people/faculty/professors|people/staff/technical-staff people/faculty


2. when I go to the site table fields_values I see

field_id item_id value
105 1447 people/faculty/professors
105 1447 people/staff/technical-staff


Which does not help me at all, because I really wanted to keep the string:
people/faculty/professors|people/staff/technical-staff

SO when I do this, do you recommend I put " " around the content?

I seem to always make things one step more complicated...

thanks,
Laura
  1. 6 days ago
  2. RO CSVI
  3. # 16
Accepted Answer Pending Moderation
Hello Laura,
With custom fields, multiple values are separated by | and so when RO CSVI gets the value with | it is inserted as individual values. That is the logic of RO CSVI code for all multiple values imported. Using "" around the content will not help. You need to use any other character other than | to have the value inserted as one. If the custom field value is just for reference, why not use any other character like # or $ or ^ instead of |?
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 5 days ago
  2. RO CSVI
  3. # 17
Accepted Answer Pending Moderation
Ok, but here is the issue, I do not see in the CONTENT for ROCSVI tag_delete

I only see this in the tags table, but I do NOT want to delete the tags in the database, I want to just delete them from the CONTENT records...

so I created a view that shows:
articleid title alias category_path tag_delete tags
1403 Motto, Douglas douglas-motto people/staff Y people/affiliated-faculty/associate-graduate-faculty-member|people/affiliated-faculty/full-graduate

but it seems that I can't remove his tags this way...

I'm creating my sql #1, which would REMOVE the tags from the article
sql #2 will add the tags for the article

thanks,
Laura
  1. 4 days ago
  2. RO CSVI
  3. # 18
Accepted Answer Pending Moderation
Hello Laura,
Ok, but here is the issue, I do not see in the CONTENT for ROCSVI tag_delete

tag_delete field is only for Joomla tags import and not supported with Joomla content import operation.

I only see this in the tags table, but I do NOT want to delete the tags in the database, I want to just delete them from the CONTENT records...

Removing the relation between a tag and content is not possible now. There is no code added for it yet.

so I created a view that shows:
articleid title alias category_path tag_delete tags
1403 Motto, Douglas douglas-motto people/staff Y people/affiliated-faculty/associate-graduate-faculty-member|people/affiliated-faculty/full-graduate

but it seems that I can't remove his tags this way...

This will not work, tag_delete is not supported in Joomla content import operation.

I'm creating my sql #1, which would REMOVE the tags from the article
sql #2 will add the tags for the article

Yes, If you know the id of the tags then it should be possible with sql queries.
Kind regards,

Tharuna

=========================
If you use CSVI, please post a rating and a review at the Joomla! Extension Directory
  1. 1 day ago
  2. RO CSVI
  3. # 19
Accepted Answer Pending Moderation
I ran an 'update' import using one of your templates to update all of my tags for all of my articles.

It seemed to work perfectly fine.

I also tested by removing 2 records from the tag-contentmap table for 2 articles, just to see if the data got added properly, when I ran the update script from rocsvi, and it did!

When I go to any of my articles, I see the tags listed properly.

Problem:
When I edit any articles that are in the people category, I receive an error:

Screen Shot 2019-12-10 at 11.50.11 AM.png

After some research it seems that this error could occur when there is a problem in the assets table...also, I'm only seeing this error with articles that I have updated using csvpro...

I tried the following:
1. rebuild all menu items
2. rebuild all categories
3. enter each category (for those articles) and resaved the category
4. rebuild the categories again

sometimes I don't get the error, but either way my change is usually saved no matter what.

Also, when I try to update something in one of the CUSTOM FIELDS, that data is NOT saved

Any ideas?

What did I break?

What can I send to you to help me debug? Unfortunately I cannot give you login access.

thanks,
Laura
Attachments (1)
  1. 1 hour ago
  2. RO CSVI
  3. # 20
  • Page :
  • 1


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