Developer forum

Forum » Integration » Languages
Mark Preisler
Reply

Hey

Ill got a problem with the Ecom Provider, when importing new EcomProducts, a new Language is created with "ImportedLANG1", even when a language with same LanguageId "LANG1" exists, and products languageid is set to the new imported language id, can enyone explain way this I happening ?

Running DW 9.6.8

Capture5.PNG

Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
As you are importing to ecom products then the source value of the language mapped to "ProductLanguageID" column is used for searching of the existing language.
The new language is inserted with an ID like "ImportedLANG1" when it fails to find the existing language by LanguageID then LanguageCode2 then LanguageName.
Or source EcomLanguages table(if you have it in the mapping) doesn't have the language with LanguageName or LanguageID equal to the one you use in the EcomProducts.ProductLanguageID mapping.
So try to check what language id "text" in the source do you have for the EcomProducts "ProductLanguageID" mapping.
Regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

My source contains LANG1 as showed in the attached file, and LANG1 is a existing languageid in DW as showed in my previous prost, but DW still create a new language.

Capture6.PNG
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
Thx. Could you also attach you Data integration job xml file?
Regards, Dmitrij

 
Mark Preisler
Reply

Yes sure.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
I see you have a custom table script selected that might change values.
Also you have a mapping for the EcomLanguages table in the job, what values do you have in the source for that table?
Regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

Not much is happening in the table script, I have attached the script.

The language import was a test, to see if it helped resolve the problem, I’ll get the same result with or without importing into EcomLanguages.

Capture7.PNG Capture8.PNG
 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
try to open your xml job file in the xml editor and edit the next mappings:

<columnMapping>
  <scriptType>Constant</scriptType>
  <scriptValue>0</scriptValue>
  <isKey>False</isKey>
  <isActive>True</isActive>
  <scriptValueForInsert>False</scriptValueForInsert>
  <sourceColumn>ProductLanguageId</sourceColumn> ------------> change to ProductPrice
  <destinationColumn>ProductPrice</destinationColumn>
</columnMapping>

<columnMapping>
  <scriptType>Constant</scriptType>
  <scriptValue>True</scriptValue>
  <isKey>False</isKey>
  <isActive>True</isActive>
  <scriptValueForInsert>False</scriptValueForInsert>
  <sourceColumn>ProductLanguageId</sourceColumn>  ------------> change to ProductActive
  <destinationColumn>ProductActive</destinationColumn>
</columnMapping>

Regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

It fixed the problem. No extra languages and products are mapped to the correct languageId. :)

But when I save the integration job all constant columnMapping are updated and the sourceColumn is set to ProductLanguageId again.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
Hi Mark, Try to move down the ProductLanguageId, ProductId, ProductNumber down in the mapping, so the first source column in the mapping is not equal to any of the Key column.
 
Mark Preisler
Reply

Hey Dmitrij

It still doesn't work the same happens when I save, all constant fields are replaced with ProductLanguageId in SourceColumn.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
try to edit your job mappings so the ProductLanguageId column is not set on the first place so it should look like that:

 
Mark Preisler
Reply

Hey Dmitrij

The same thing happens when ProductLanguageId isn’t the first column, all constant fields sourceColumn ar set to ProductLanguageId when I save from within the administration, and the job starts to create new languages ​​in the EcomLanguages ​​table.

 

 

 
Mark Preisler
Reply

bump

 
Mikkel Ulstrup
Reply

Any news on this issue?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
it is a bug. Could you replace the XmlProvider dll file in the website bin folder with the one attached here and see if your issue is solved?
Kind regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

ProoductLanguageId is still used in sourceColumn node when saving the job after replacing the dll.

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Mark,
this should not be a problem. Try to update the dll with the one I've sent you before, delete all languages with "Imported" prefix from the database and run the job again and check if no new languages are created in the database after the job run.
Regards, Dmitrij

 
Mark Preisler
Reply

Hey Dmitrij

 

It worked, the import job is now running as expected. :)

When can we expect to see this change on Nuget ?

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

It should be included in the next Dynamicweb 9.8.9 hotfix

 

You must be logged in to post in the forum