Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Option to preserve STRUCTURE url_title on import
Status | Resolved |
Add-on / Version | DataGrab 4+ |
Severity | |
EE Version | 6+ |
Paul Larson
Nov 12, 2022We import eCom items via cron from an ERP.
Say a product exists:
Title: SKU1234
Product name: My amazing product
Structure_url_title: my_amazing_product
Native url_title: my_amazing_product
When I run the Datagrab import, the above becomes:
Title: SKU1234
Product name: My amazing product
Structure_url_title: sku1234
<----------
Native url_title: my_amazing_product
This is enough to make the item 404.
To get past this, I seem to have made this hack to the prior DataGrab:
https://www.dropbox.com/s/x1ffvl9xuekfii2/2022-11-12_13-59-23.png?dl=0
raw text:
Approx line 362 in old DG, datagrab_model.php
$data[“cp_call”] = TRUE;
// PGL Hiding below so DataGrab doesn’t un-set the Structure URL
// $data[“structure__uri”] = url_title( strtolower( $data[“title”] ) );
$data[“structure__template_id”]= $row[“template_id”];
$data[“structure__parent_id”] = 0;
I don’t know _why_ that worked; or maybe I got lucky and it was something else. But worth checking there.
BoldMinded (Brian)
Nov 13, 2022
Paul, try this build on a local or dev site. It has a new section to configure the Structure import options.
https://www.icloud.com/iclouddrive/099FCH8kDw7SiQQnVJJDz3gow#datagrab-4.2.0a-module-handler-9257fe07
BoldMinded (Brian)
Nov 21, 2022
New options to manage the Structure data on import were added in version 4.2
Paul Larson
Jan 03, 2023
I’m on 4.2.1 but still having the behavior where DataGrab reverts/defaults a Structure URL title, which I need to maintain.
Screenshot of live vs dev after the important.
https://www.dropbox.com/s/it7fwkxeilp9jb9/2023-01-03_19-49-25.mp4?dl=0
Ideally the Structure URL would remain untouched.
Paul Larson
Jan 03, 2023
Comment has been marked private.
BoldMinded (Brian)
Jan 04, 2023
There is a whole section to configure the Structure settings but I didn’t see its settings in the video… what do you have them set to? Have you tried adjusting the settings?
Paul Larson
Jan 04, 2023
Ah! I see it now.
Paul Larson
Jan 05, 2023
I assume DG only shows the settings if the channel uses Structure? Makes sense, but might be why I didn’t notice it.