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..

Hello everyone, we are facing some problems regarding locales and CMS-Contents. Is anyone running a

UKTSRTD5M
UKTSRTD5M Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello everyone, we are facing some problems regarding locales and CMS-Contents. Is anyone running a setup with more than one store attached to one database - but without one store including all available locales? (we got one store having locales de_CH and fr_CH / another store with it_CH only). Problem then is: As the import infrastructure collects the locales by the actual store the process runs in, not dependent on the store-relations, italian locale is missing out. What do you think: Could this be considered a core bug? Or something which could / should be fixed in the core? Or should the core keep the assumption of having imports run by a store which includes all locales needed?
Codewise this manifests itself e.g. in \Spryker\Zed\CmsStorage\Business\Storage\CmsPageStorageWriter::pairCmsPageEntitiesWithCmsPageStorageEntities:


Comments

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    Hi Georg,
    Spryker default store is not considering the locales for other stores, One solution is to include all locales for the default store in store.php which workers or data importer are running.
    Spryker doesn’t support this out of the box

  • UKTSRTD5M
    UKTSRTD5M Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi @UK9N7MP96, thanks for your answer. But including all locales would have unintended side-effects: it would take up more ressources (time & memory - in our case it would double both) and it would lead to the store having a locale we don't wan't it to have (at least without hacking around on this side again). So we really want to fix it on the import side. I know that it's not supported ootb, but i would argue it's a bug (as it takes an assumption which is not always true). But if you don't see it like this we are solving it on the project level...

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    We are aware of this strategy that one store wants to manage al other store entities, locales, OMS or one Zed GUI for all, we are currently working for this feature/guidline.
    Can you please make sure if you have the latest version of CmsStorage module?

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    Spryker/Zed/CmsStorage/Business/Storage/CmsPageStorageWriter.php:379


  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet

    this must return all locales for all stores for CmsStorage

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019
  • UKTSRTD5M
    UKTSRTD5M Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi @UK9N7MP96, thanks a lot, that has been exactly what is was looking (and hoping) for. Still: https://github.com/spryker/cms-block-storage/blob/master/src/Spryker/Zed/CmsBlockStorage/Business/Storage/CmsBlockStorageWriter.php does not have the same ('old') behaviour" $localeNames = $this->store->getLocales(); - can we expect this to be fixed as well soon? Are you aware what other parts could suffer from the same problem?

  • Ehsan Zanjani
    Ehsan Zanjani Head of Solution Architecture @ Spryker Posts: 113 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited September 2019

    Yes we are aware of these modules, in general we should fix all modules which don’t have store concept and basically belongs to all store, like translation, navigation, etc, I’ll create a followup tickets for this.

  • UKTSRTD5M
    UKTSRTD5M Posts: 77 πŸ§‘πŸ»β€πŸš€ - Cadet

    πŸ‘ thanks again