Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing 'Enabled' status doesn't work #822

Closed
KarlBishop opened this issue Mar 18, 2021 · 8 comments
Closed

Importing 'Enabled' status doesn't work #822

KarlBishop opened this issue Mar 18, 2021 · 8 comments
Labels

Comments

@KarlBishop
Copy link

KarlBishop commented Mar 18, 2021

Description

Setting 'Enabled' status of Entries via an XML import is not working.
The FeedMe log shows that "enabled":true was detected and that the Entries were added or updated successfully:

info | ↳ My Test Import: Match existing element with data {"title":"Testing"}.    | 18/03/2021 05:43
info | ↳ My Test Import: Data ready to import {"title":"Testing","enabled":true}. | 18/03/2021 05:43
info | ↳ My Test Import: Entry #46886 added successfully.                         | 18/03/2021 05:43

But the Entries remain in the 'Disabled' state.
Data is imported successfully to all other fields.
Even if I set 'Status' to "Use default value" and the default value to "Enabled" it still does not update the status.

Some things to note:

  • Entries are being added to a Channel Section
  • The Section is available on multiple Sites (the import is targeting the Primary Site)
  • Propagation Method is "Save entries to all sites enabled for this section"
  • Default Status for the Primary Site is Disabled

Steps to reproduce

  • Import this xml file using Create and Update strategies:
<?xml version="1.0" encoding="UTF-8"?>
<entries>
  <entry id="688">
    <title>Testing</title>
    <status>Enabled</status><!-- I've also tried values of true and 1 here with same result -->
  </entry>
</entries>
  • Set Title to <title> and Status to <status>
  • Or use default value "Enabled" for Status
  • Run feed...
  • The added / updated Entry is Disabled (despite "enabled":true appearing in the Log)

Additional info

  • Craft version: 3.6.10
  • PHP version: 7.4.15
  • Database driver & version: MySQL 8.0.23
  • Plugins & versions:
    • Campaign 1.19.1
    • Cloner 1.2.2
    • Control Panel Nav 3.0.15
    • Copy 1.0.3
    • Dashboard Begone 1.0.1
    • Feed Me 4.3.6
    • fortrabbit Object Storage Volume 2.1.0
    • Patrol 3.1.3
    • Redactor 2.8.5
    • SEOmatic 3.3.35
@KarlBishop KarlBishop added the bug label Mar 18, 2021
@dreadfullyposh
Copy link

I'm also seeing this behavior. Any chance you've found a fix?

@KarlBishop
Copy link
Author

I used an ugly backwards workaround...

It only works if your XML contains ALL the entries you want enabled and none of the entries you want disabled:

  1. Set all entries to enabled in the CP

  2. When importing, tick one of these boxes based on your needs:

    • "Disable missing elements globally"
    • "Disable missing elements in the target site"

After the import, all entries not included in the XML will be disabled, leaving just the ones you wanted enabled.

@rathesDot
Copy link

I have a similar issue but with JSON imports. I tried enabled, Enabled, live, 1 and true as values but none of them work.

@dreadfullyposh
Copy link

I've been having moderate success with '1' but in quotes as a string. It does seem that it's not always consistent though.

@andrewcgregory
Copy link

Also experiencing what sounds like the same issue. We are importing a JSON feed of entries, pulled from another system. The import works fine, but it is inconsistent that the entries come in as enabled. If they are not enabled, then when we run the feed again it seems to enable them. Any chance on a fix for this as the workaround posted does not fit our requirements since the feed we are importing only has a set of data from the last 2 weeks, but we want to keep all of the previous data enabled in Craft.

@stevefloat
Copy link

We're also experiencing this issue - or at least one very similar - in Feed Me v4.3.6.

We have a JSON feed of entries with a mix of 'Enabled' and 'Disabled' statuses. We have a separate task to build this JSON feed to ensure all existing statuses from Craft are preserved.

I can see in the JSON file that the correct 'Disabled' status is set for my entry in question, however once the import runs the entry is set to 'Live'.

We have other entries where the statuses are correctly preserved.

The primary difference for the entries where we see the status being incorrectly applied, is that they were previously set to 'Live'. I have tested this by manually changing an entry from 'Live' to 'Disabled' in Craft, running the import (where the JSON feed has the correct 'Disabled' status) and can see the entry is reset to 'Live'.

I've been through our own set up many times to see if anything is interfering, however it feels like the above bug.

Any feedback would be helpful on this!

@bleepsandblops
Copy link

Encountering same issue as #822 (comment)

@angrybrad
Copy link
Member

Feed Me 4.5.1 is out with a fix for this. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants