Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig100 1136 posts 2523 karma points c-trib
    May 17, 2021 @ 20:16
    Craig100
    0

    Import does not respect Location

    Umb 8.12.2 CMSImport V4.1.1

    Not sure if this is a bug or I'm doing something wrong, so here goes:-

    TLDR; Items are imported under the wrong location.

    I have a site structure like so:-

    • Home
      • Container 1
        • Docking
          • Greeting Page 1 (docType A)
          • Greeting Page 2 (docType A)
          • Greeting Page 3 (docType A)
      • Container 2
        • Greeting
          • Greeting Page 1 (docType A)
          • Greeting Page 2 (docType A)
          • Greeting Page 3 (docType A)

    docType A is a very simple set of textBoxes.

    Importing from CSV files, I have an Import Definition for Container 1/Docking which has it's Location set to Home/Container 1/Docking. It imports all three Greeting Pages correctly.

    I have another Import Definition for Container 2/Greeting which has it's Location set to Home/Container 2/Greeting. It Imports 0 but says it's Updated 3.

    On close inspection the Import Definition for Container 2 has updated the Greeting Pages under Container 1. There is nothing in Container 2/Greeting.

    I've checked everything I can think of and so I want to know if this is a bug or do I need some special configuration. Here's the Summary for the import definitions, differences in brackets:-

    Datasource options

    Select a file: CMS-Content-Container1-Standard-Screen-Docking.csv (CMS-Content-Container2-Standard-Screen-Greeting.csv)

    Field Separator: ,

    Text Indicator: "

    Import options

    Location: Docking (Greeting)

    DocumentType: Standard Screen Block

    Auto publish: Yes

    Enable content updates: Yes

    When the record already exists: Update record

    Select primary key in datasource: Screen Name

    Delete old records: Yes

    Enable recursive imports: No

    Mapping

    Name - Screen Name

    Title Text1 - Title Text1

    Title Text2 - Title Text2

    Body Text1 - Body Text1

    Body Text2 - Body Text2

    Any advice would be greatly appreciated.

    Regards,

    / Craig

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 18, 2021 @ 08:23
    Richard Soeteman
    0

    Hi Craig,

    You are propably using the same primary key and value for the second tree. CMSImport finds the relation based on primarykey and value then finds the first imported documents and map those. If you make sure the id's are unique it should be ok

    Hope this helps,

    Richard

  • Craig100 1136 posts 2523 karma points c-trib
    May 18, 2021 @ 10:02
    Craig100
    0

    Hi Richard,

    I just tried that and while the definitions now import into their correct locations (thanks), they only import the last of the three items in the CSV. The finished report shows:-

    Duration: 00:00:00

    Records in datasource: 3

    Records added: 1

    Records updated: 2

    I checked the Recycle bin was empty first, just in case.

    I have no idea what it's "updated" as all other records appear to be correct.

    The primary key for the 3 records is the same (but different per definition!). It's just the name of the parent container.

    Regards,

    Craig

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    May 18, 2021 @ 10:18
    Richard Soeteman
    0

    Hi Craig,

    It checks the CMSImportRelation table. If you can send me the two files I can check what is wrong.

    Best,

    Richard

  • Craig100 1136 posts 2523 karma points c-trib
    May 19, 2021 @ 14:25
    Craig100
    0

    Hi Richard,

    Thanks for looking at the files for me and the advice.

    What I ended up doing was ensuring every node to be imported had a unique name and also made sure I used the same item name for the Select Primary Key and the Name selections.

    All is working now. But I'm still wondering if I really needed to rename everything. If the Location could be made part of the ID being tracked then the fact that pages have the same name may not matter as much.

    Regards,

    Craig

Please Sign in or register to post replies

Write your reply to:

Draft