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..
I think I found importer bug. Here is the scenario. In stores.php I have added 3 locales for $tem
I think I found importer bug. Here is the scenario.
In stores.php I have added 3 locales for $templates and $stores variable: en_US, de_DE, en_GB
. I am importing category data which is throwing following error:
Spryker\Zed\DataImport\Business\Exception\DataImportException - Exception: Unable to execute INSERT statement [INSERT INTO spy_url (id_url, fk_locale, fk_resource_categorynode, url) VALUES (:p0, :p1, :p2, :p3)]
To find out underlying issue, I kept only one record, root category demoshop in category.csv and category-store.csv file.
On debugging it, I found that when importer is trying to create category, it generates the urls from locale value's first key(bolded text) en_US, *de*_DE, *en*_US in spy_url
table. as we have *en* for en_GB and en_US, it throws above error. If I change the first key of *en*_GB to *gb*_GB or *egb*_GB importer runs without any error (ofcourse data for en_GB won't get uploaded).
I believe someone might have seen this issue before. or is there any better way we can handle translation of it? Any help would be appreciated.
Comments
-
Hi @U035GSLDLVD, you got it right, it's the way Spryker generates URL. This also applies to products and I believe also to CMS pages. Since only the first part of the locale is used in the URL and every URL has to be unique - for a good reason - it doesn't work that way.
If it only affects the URLs, you could include the whole locale in the URL (e.g. www.shop.com/en_gb/category1 etc.).
Spryker should have known about this bug for a long time, because we already talked to them about it in our project more than a year ago.0 -
@UP8T3GKFH Thanks for your reply. How did you overcome this issue? Where did you kept the full locale url?
0 -
We did not implement this in the project. We only pointed out to Spryker that this will lead to the problem.
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