Developer forum

Forum » Integration » Item provider clarification

Item provider clarification

Mikkel Ulstrup
Reply

Hi,

I have a couple of issues, that I want to hear your take on. Some are probably bugs, but maybe the way I use it is wrong.

  1. When using the itemprovider, the checkbox "Delete page, paragraph associated with missing items" does not delete pages.
  2. Importing items through the item provider have an effect on the loop "GetLoop("Languages")" when accessing the "New item root page". 
    1. In this case the "New item root page" is the page named "projects". as you can see, it has no effect on the frontpage. See video here: https://www.screencast.com/t/aA8eYvAyk7
    2. Do I need som special setting for the item, the avoid the behavior?
    3. The item used here is a code-first item whith the following settings: https://www.screencast.com/t/lWEqptyA0
    4. I also tried importing without "New item root page", and instead specifying DestinationPageID and RelevantAreaId only to the "master site", but that also gave me a result med many entries og the languages.

 

Dyanmicweb version: 9.3.4

Destination settings: https://www.screencast.com/t/Vz3iLujw

 

Let me know if you need more information!

 

Kind regards

Mikkel Ulstrup


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,
Thanks for finding. Both cases are bugs and will be fixed soon. TFS# 40323, 40324 have been created.
Regards, Dmitrij

 
Mikkel Ulstrup
Reply

Do you have an ETA? The project has a planned release date next month.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Planned to finish them on this week.

 
Mikkel Ulstrup
Reply

Thank you!

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Mikkel

The problem TFS#40324 + TFS#40323 "Importing items through the item provider problems" has now been fixed in version 9.3.5

You are able to find this build in the download section:

http://doc.dynamicweb.com/releases-and-downloads/releases

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Mikkel Ulstrup
Reply

Hi again,

After upgrading, two new errors occurred.

  1. When importing the items, it keeps clearing my website settings.
  2. URL's to the items does not work unless I reset the IIS or use the &purge=true parameter.

 

Let me know if you need som more information.

 

Kind regards

Mikkel Ulstrup

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,

Could you make a screen what website settings are cleared?
Could you make a screen with your Url settings from the Settings->Web and Http->Customized Urls?
Regards, Dmitrij

 
Mikkel Ulstrup
Reply

website settings

I am unable to reproduce this after setting it up on my other machine.

 

Settings->Web and Http->Customized Urls

This issue still exists. Here are my URL settings.

https://www.screencast.com/t/izjQmkeLV

https://www.screencast.com/t/4v0zEuPgiv

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,
got it reproduced. TFS# 40590 created.
Regards, Dmitrij

 
Mikkel Ulstrup
Reply

I managed to reproduce the error with the website settings in 9.3.5.

 

See the result here:

https://www.screencast.com/t/R2ZzLXILzp0

 

It removes the item (just the relation, not the entire itemtype), that was originally set as website setting item. Then it displays all the fields from my itemtype that I am importing.

 

Theese are the settings from my codefirst item:

 [Item("Project item", "Projects with information")]
    [AreaRule,
           ModuleAttachmentRule(true),
           StructureRule(StructureContextType.Pages),
           ParentRule(ParentRestrictionRule.ParentType.RegularPage),
          ChildRule(true), //ChildRule("ExampleCategory", "ExampleRegion")
        ]
    [Category("SGM")]
    [CustomizedUrls]
    [Icon(Dynamicweb.Core.UI.Icons.KnownIcon.FlashOn)]
    [TitleField("Title")]
 
Mikkel Ulstrup
Reply

The website setting problem does not occur in 9.3.4

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,
once you have selected the checkboxes to "Remove missing" and "Delete associated" and if you are not importing the item which is associated with your web site
(and it seems to me that you have associated the web site with the same item type that you are importing from the Data integration job)
from your source xml file - the missed item will be removed from ItemType_* table and from the web site association too.
I was checking it with ItemProvider 1.0.10. I've set the web site to some item type and filled the item fields and saved the changes. Item type table contains the saved data.
Imported the xml file with same item type rows but without the row which was associated with the web site settings.
Opened the web site and noted the relation was empty and no item fields were shown.
So you need to include the item which is used in your web site settings being present in the xml file for the import or use another item type for the web site settings.
Regards, Dmitrij

 
Mikkel Ulstrup
Reply

Hi Dmitriy,

 

once you have selected the checkboxes to "Remove missing" and "Delete associated" and if you are not importing the item which is associated with your web site (and it seems to me that you have associated the web site with the same item type that you are importing from the Data integration job)

I have selected both "remove missing" and "Delete associated", but the associated item type for the website settings is another item type than the one I am importing.

 

Imported the xml file with same item type rows but without the row which was associated with the web site settings. Opened the web site and noted the relation was empty and no item fields were shown.

This is not what happend. As you can see, after the import (which is when the video was recorded), no item is associated, but fields (from the worng item type) are shown.

 

Kind regards

Mikkel Ulstrup

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,
I can not get it reproduced. Could you try with a newly created item type?
What are your steps? Could you send your source xml file, data integration job xml file and your item types definitions xml's( or source codes)?
Email: dbe@dynamicweb-cms.com
Regards, Dmitrij

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mikkel,
finally got it reproduced. Problem is in the xslt "RelevantAreaId" part:

        <column columnName="DestinationPageID">
            <xsl:value-of select="2382"/>
          </column>
          <column columnName="RelevantAreaId">
            <xsl:value-of select="1"/>
          </column>

You need to remove the part for "RelevantAreaId", as you are importing items as pages to the root/some destination page. So it needs to be just:
       <column columnName="DestinationPageID">
            <xsl:value-of select="2382"/>
          </column>
Regards, Dmitrij

 

You must be logged in to post in the forum