Publisher is EE6 compatible, but it does not support the Fluid field. 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, 2022

We 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:

screenshot:

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.

#1

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

#2

BoldMinded (Brian)

Nov 21, 2022

New options to manage the Structure data on import were added in version 4.2

Login to reply