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

We import CMS Pages by creating a `CmsPageTransfer` object, adding data and in the end calling ```$t

UM4BZSK7T
UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

We import CMS Pages by creating a CmsPageTransfer object, adding data and in the end calling

$this->getCmsGuiFacade()->activatePage($idCmsPage);

$this->getCmsGuiFacade()->publishWithVersion($idCmsPage);

Spryker gives no errors and all seems fine. Still the contents are not published to Yves. It seems the Publish Events are missing from the queue. If we press the publish button in the backend everything is fine. Any suggestions?

Comments

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

    The publish did work with Spryker CMS 7.0.0. Now we use 7.7.1

  • Andriy Netseplyayev
    Andriy Netseplyayev Domain Lead Solution Architecture Sprykee Posts: 519 πŸ§‘πŸ»β€πŸš€ - Cadet

    hm, sounds like a bug from the first sight. cc @UK9N7MP96 @valerii.trots have you heard anything about that?

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

    This must communicate with CMS stream through the bug report if this is a bug in core

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UM4BZSK7T do you use Spryker DataImport module for that? If yes, you need to know that events in DataImport is disabled by default. You need trigger it manually by extending \Spryker\Zed\DataImport\Business\Model\DataImportStep\PublishAwareStep

    $cmsVersionTransfer = $this->cmsFacade->publishWithVersion($dataSet[CmsPageStoreDataSet::ID_CMS_PAGE]);
    
    $this->addPublishEvents(CmsEvents::CMS_VERSION_PUBLISH, $cmsVersionTransfer->getFkCmsPage());
    
  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    see \Spryker\Zed\CmsPageDataImport\Business\CmsPage\CmsPagePublishStep for references

  • Stanislav Matveyev
    Stanislav Matveyev Tech Lead @ Spryker Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    BTW you have getCmsGuiFacade() in your example. We don’t have facade in CmsGui module.

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

    It seems we are missing the kernel terminate events. During our spryker module updates we did

    new EventBehaviorServiceProvider(),
    

    remove that. Still I have added it again but no change the contents are not published and the event is not added. I deleted all cache fodlers as such strange behaviour seems a bit like a stale cache. But no change. So I will debug some more.

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

    About "there is no face in CMS gui" Yes that is right but there is a \Spryker\Zed\CmsGui\Dependency\Facade\CmsGuiToCmsBridge::publishWithVersion Bridge. Maybe we found that first instead of the CMS module itself. I want to change this later.

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

    We are really stuck with the exception The service

    "dispatcher" is marked as frozen an can't be extended at this point.
    

    I don't really know what to do about that. If I add EventBehaviorServiceProvider to \WF\Zed\Application\ApplicationDependencyProvider::getApiServiceProviders I will always run into that exception. The same service is added to getServiceProviders and that runs without problems. If I leave it away the system runs but misses kernel.terminate I have no clue why you freeze those dispatcher events and wy this seems to come at a different place for API Calls.

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

    Have you seen the troubleshooting advice here: https://documentation.spryker.com/v3/docs/container-201903 ?

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

    This leads imho to \Spryker\Zed\WebProfiler\Communication\Plugin\Application\WebProfilerApplicationPlugin::extendEventDispatcher

  • ULYHEM6M7
    ULYHEM6M7 Posts: 13 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    you cannot add this SP twice, that’s why it was removed

  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    We have β€œfrozen” exception if you get ir from container when we register services.
    As I understand you are using application plugins and service providers in the same time. Could you send me a list of service providers that you use in the api stack?

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet
  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    Great. Would be nice if you can show me your application plugins stack if you are using them

  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    I need to know if you are using

    EventDispatcherApplicationPlugin
    

    there

  • UM4BZSK7T
    UM4BZSK7T Posts: 174 πŸ§‘πŸ»β€πŸš€ - Cadet

    This one?

  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    Nope. In your ApplicationDependencyProvider might be the method

    getApplicationPlugins
    
  • Serhii Chepela
    Serhii Chepela Application Architect @ Spryker Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet

    If you don’t have, it’s ok

  • ULYHEM6M7
    ULYHEM6M7 Posts: 13 πŸ§‘πŸ»β€πŸš€ - Cadet

    Looks like we do miss the event-dispatcher module