All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: DataGrab imported entries coming in a drafts in Publisher

Status Resolved
Add-on / Version DataGrab 5.1.1
Severity
EE Version 7.3.14

James Brown

Dec 19, 2023

Hello-
I’m having a bit of a problem using DataGrab to bring in entries. I’m using the latest EE and DataGrab along with Structure and Publisher Lite. I did install the Publisher DataGrab Connector add-on. The import is in XML format (I attached it below). I do have included:

<publisher_status>open</publisher_status>
<publisher_lang_id>1</publisher_lang_id>

When I run the import the first entry ends up being published in Publisher. The others are in draft. All other data comes through as expected from the import. While this test import is only 4 entries, I do have some larger imports to do, so I need to get worked out how to bring in the content AND have it be published in Publisher as well.

Thanks!
James

#1

BoldMinded (Brian)

Testing with 4 entries is perfect, but I don’t see an attached XML file. Can you share on Dropbox or paste it into a comment using the <pre><code> blocks?

#2

James Brown

Comment has been marked private.

#3

James Brown

Comment has been marked private.

#4

BoldMinded (Brian)

So, maybe this is the problem… I think you’re conflating the published status with the entry status. They’re different. Your screenshot of the entries is correct, the English version is in draft mode, but the entry itself is set to Open. Setting the entry to Draft sets all translations to draft… the entire entry. You an have the entry set to “Open”, and each translation has a separate “open” or “draft” state. Your config has the default status set to the channel default, so if you want the entry set to default during importing you need to change the channel default or set that value in DG’s configuration.

I was surprised to hear of this bug report b/c the publisher datagrab extension has been pretty solid for several years now. I don’t think there is any actual bug here, just a misunderstanding of what the statuses do.

#5

James Brown

Hi Brian. I definitely understand the entry status vs the publisher draft vs published. I’m obviously not setting something right though. 😊

So I did go into Publisher and tried changing the Default Save Status to “Open”, then in the DataGrab import settings changed the Status field from “Channel default” to “open”. But when I re-ran the import they are still coming in as drafts in Publisher. I do of course have open</publisher_status> in there for each entry in the actual import file as well.

I’m a bit stuck still on how to have the entries come in with a Publisher status of published. I guess also confused why the first one does come in as published and the others don’t.

#6

BoldMinded (Brian)

You might need to put that file on Dropbox or something, tags are getting stripped out.

#7

James Brown

Comment has been marked private.

#8

BoldMinded (Brian)

I found the issue, just need to figure out a fix. I added something awhile back to Publisher itself, not the DG extension, to fix another issue, and it’s stopping Publisher from properly saving when importing.

#9

BoldMinded (Brian)

Comment has been marked private.

#10

BoldMinded (Brian)

Comment has been marked private.

#11

James Brown

Ok, getting closer! The entries are now coming in as published… BUT, it’s creating 3 copies of each entry. So instead of 4 entries, I have 12. I tried deleting all the entries and running the import again with the same result.

#12

BoldMinded (Brian)

Did you update both Publisher and DataGrab?

#13

James Brown

yea, uploaded both packages.

#14

James Brown

I will say once I uploaded both packages there wasn’t anything in the add-ons section of the UI for either add-on asking to run an update process though.

#15

BoldMinded (Brian)

Based on your settings you don’t have the “Use this field to check for duplicates” selected. Set it to the Title and see what happens. I can run your import file repeatedly and still only have 4 entries.

#16

James Brown

Ok, specifying a duplicate check field definitely stops the repeat entries. It does seem like there might be a little gremlin in the code since I was starting from 0 entries, so it shouldn’t have created those additional copies. But at least I have a workable solution! Thanks for the help.

Login to reply