1. scarney
  2. RO CSVI
  3. Friday, 01 November 2024
  4.  Subscribe via email
I have been trying to prepend a string for the Categories while doing a content import but the category paths are not being changed. Instead they are all doing the default behavior of being placed in uncategorised. I am able to import all of the articles. I hope you can tell me what I am doing wrong.

This is what I am doing:

1) Making a copy of Example Joomla Content Import Migrate
(I am using migrate because the Joomla versions I am importing from are both version 4.4.9 and I am importing into Joomla 5.2.0

BTW, I am creating folders in images and creating the following categories:

New categories: Imported/ShalomLC

New Image folders: images/imported/shalomlc

I also create a rule hoping to get the category paths to have imported/shalomlc/ prepended.
I enabled all of the 6 plugins

Then I added a new rule:
Name: Prepend imported shalomlc
Action: Import
Plugin: RO CSVI Multireplace
I think clicked the Load plugin button
Replacements
Operation: Add before value
Filter: Value: Imported/ShalomLC/
Ordering: 0

Here are my settings:

Details
Details:
Name: Import ShalomLC
Alias: import-shalomlc
Enabled: Yes
Ordering: 0
Enable logging: Yes
Error Reporting: Global Settings
Enable frontend/cron: Never
Template ID: 9
Secret key:
Notes:
Tags:

Operations:
Action: Import
Component: Joomla Content
Operation: Content

Source
Source: Load from your computer

File
Autodetect delimiters: Yes
I'm Mac: Never
Use file for configuration: Yes
Skip first line: Never
Skip empty custom fields: Never
Record container:
Record name:
Extra Nodes:

Options:
Keep Content ID: Yes
Language: English (United States)
Unpublish before import: Never
Recreate alias: Never
Append Tags: Never

General Options
Image:
Location Image Files: images/imported/shalomlc/
Use location from custom field: Never
Delete image relations: Never
Process images: Yes

Full image options
Save images on server: Yes
Re-download image: Yes (not sure why?)

Watermark: Never
Right margin: 0
Bottom margin: 0
Image:

Separators:
Using all your default settings

Fields:
Global Rules
Field Name: category_path
Select a Rule: prepend imported shalomlc
Before/After: Before

Limit:
Using all your default settings
Accepted Answer
Accepted Answer Pending Moderation
Hello Sean,
I have tried importing with the setting for Options->Keep Category ID: set for Yes and also Options->Keep Category ID: set for Never. But either way the import is overwriting some of my Category IDs.

Do you have any idea what might be causing that? It is very unusual and makes no sense to me.

If you want new category IDs on import you need to do two things, In import file remove id field and in import template on Options tab set Keep Category ID is set to No.
When you have id field in import template, existing rows with id are updated and that should be the reason existing categories are overwritten. When id field is removed RO CSVI will use category_path field to find existing categories, if not found new categories are created with new IDs. Try this and let me know on how it goes.

I am wondering if there is any way to have the incoming imported files all be assigned new Category IDs and probably new Article IDs.

You need to set Keep category ID to No on Options tab in Joomla category import template and that way imported category_path will get new category IDs. Same way set Keep content ID to No in Joomla content import and articles will get new IDs. Remove id field from import files.
Kind regards,

Tharuna

=========================
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. # Permalink
Sorry, the discussion is currently locked. You will not be able to post a reply or a comment at the moment.