What are the Slack Archives?
It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi everyone, I have to create a new language FR for a shop but even if i have traduce the glossary.c
Hi everyone,
I have to create a new language FR for a shop but even if i have traduce the glossary.csv and all the .csv files that need to be traduce i have this error :
Zed.CRITICAL: Spryker\Zed\DataImport\Business\Exception\DataSetBrokerTransactionFailedException - The key "title.fr_FR" was not found in data set. Available keys: "navigation_key, node_key, parent_node_key, node_type, title.en_US, url.en_US, css_class.en_US, title.de_DE, url.de_DE, css_class.de_DE, valid_from, valid_to, locales, idNavigation" in "/data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php::59" {"exception":"[object] (Spryker\\Zed\\DataImport\\Business\\Exception\\DataSetBrokerTransactionFailedException(code: 0): The key \"title.fr_FR\" was not found in data set. Available keys: \"navigation_key, node_key, parent_node_key, node_type, title.en_US, url.en_US, css_class.en_US, title.de_DE, url.de_DE, css_class.de_DE, valid_from, valid_to, locales, idNavigation\" at /data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php:59) [stacktrace]
I can't touch this part of the code, does someone know how to change this ?
Comments
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
Not 100% sure what is the problem but the exception seems to come from data from this file
data/import/common/common/navigation_node.csv
which gets executed here:src/Pyz/Zed/DataImport/Business/Model/NavigationNode/NavigationNodeWriterStep.php
maybe this helps you to set the proper breakpoint and debug it0 -
Thank you but i already know it, navigation_node.csv is the file that i traduce i need to passe the "title.de__DE" in "title.frFR" but when i do it i have this error and if i correctly understand the message, a "data set" exist and the title.fr__FR does'nt exist in it but i don't know where i can find this "data set"
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
src/Pyz/Zed/DataImport/Business/DataImportBusinessFactory.php
thecreateNavigationNodeImporter()
has “createLocalizedAttributesExtractorStep()” which seems to use locales defined from “createAddLocalesStep()”0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
and in
src/Spryker/Zed/DataImport/Business/Model/DataImportStep/AddLocalesStep.php
there is:protected function getLocales(): array { $locales = []; foreach ($this->storeFacade->getStoresAvailableForCurrentPersistence() as $storeTransfers) { $locales = array_merge($locales, $storeTransfers->getAvailableLocaleIsoCodes()); } return $locales; }
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
and it seems there the fr_FR is not properly returned
0 -
I don't even have src/Spryker/...
0 -
How can i change it if i don't have access to this folder ?
0 -
Why so complicated? the importer doesn't find a entry with the added language key *.fr_FR in the
navigation_node.csv
file. So add two new columns with[title.fr](http://title.fr)_FR
_and[url.fr](http://url.fr)_FR
and fill the needed information (title in fr and the url in fr) that's it._0 -
these two column already exist
0 -
there are already filled
0 -
But the error message says
Available keys: "navigation_key, node_key, parent_node_key, node_type, title.en_US, url.en_US, css_class.en_US, [title.de](http://title.de)_DE, [url.de](http://url.de)_DE, [css_class.de](http://css_class.de)_DE, valid_from, valid_to, locales, idNavigation"
and i do not see these two entries.0 -
yes but they exist in the file, it's like you can't create an fr entry because something block it
0 -
I have a title.fr_FR entry in my csv file
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
“I don’t even have src/Spryker/...” - sry, i copied the wrong url. prefix that one with vendor/spryker/data-import/..
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataImportStep/AddLocalesStep.php
0 -
It's a cloud configuration i don't have access to the vendor folder
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
You should be able to reproduce this locally, shouldnt you?
0 -
Yes but what the goal if i can't import it online after ?
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
So I agree that sometimes exceptions just happen with prod data or prod/staging environment and then you often need to look a bit more in these systems. but the first approach and way to go should be in my opinion to replicate the behavior locally so you can also test your fix properly. I am quite sure that if you touch
navigation_node.csv
and make it like the one in staging/prod that you likely will have similar behavior.0 -
But i don't even understand what you want change in this file, i should find the de_DE and the en_US in this file if it return the locales values, no ?
0 -
And yes i have same behavior because fr_FR doesn't exist
0 -
it only exist in my csv file but your documentation don't explain how to create a language
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
no, i do not want to change anything in the file from vendor. But i personally would use it as starting point for debugging.
Documentation is a bit thin, you are right. maybe https://docs.spryker.com/docs/scos/dev/tutorials-and-howtos/howtos/howto-set-up-stores-with-multiple-locales.html#configure-locales-for-store and https://docs.spryker.com/docs/scos/dev/back-end-development/data-manipulation/datapayload-conversion/multi-language-setup.html#configure[…]for-store give some hints.
Did you change
config/Shared/stores.php
to have the fr_FR locale for your store there?0 -
yes i do !
0 -
and i already read the two docs you just send
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
hmm.. then the only thing i see right now as next step to debug is to find what
vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataImportStep/AddLocalesStep.php
vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataImportStep/AddLocalesStep.php
getLocales()
returns0 -
ok i start a locale server and i try it but i don't understand the point
0 -
How can i teste this function ?
0 -
test*
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,084 ⚖️ - Guardians (admin)
with xdebug for example
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 76 Spryker News
- 929 Developer Corner
- 787 Spryker Development
- 89 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 26 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random