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. I redo the spy bootcamp. And now I have an issue with challenge "Content and Search - persona

UQS4LDZU7
UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet
edited March 2020 in Help

Hello. I redo the spy bootcamp. And now I have an issue with challenge "Content and Search - personalized catalog page".

Comments

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

    My index.twig resides in Theme/default/views/index

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    And the IndexController points to it:

    '@PersonalizedProduct/views/index/index.twig'
    
  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Someone knows, whats wrong here maybe?

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    either cache or wrong path

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank levgen. Will check

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    imho, this instruction in training is wrong:

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    It has to be rather: "Theme/default/views/index/index.twig"

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Then it works

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Will write a comment to the challenge

  • Ievgen Varava
    Ievgen Varava Sprykee Posts: 154 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UJN2JRU4F please take a look

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    And also, as we are at the subject, I think (maybe Im wrong), the signature for the QueryPlugin class should be rather:

    class PersonalizedProductQueryPlugin extends AbstractPlugin implements QueryInterface,SearchContextAwareQueryInterface
    
  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    In the training instruction its just : '''class PersonalizedProductQueryPlugin implements QueryInterface'''

  • You are correct

  • Corrections are on the way, thanks for the good catch πŸ‘

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    You are welcome! Thank you too πŸ™‚

  • U010DNAA3QW
    U010DNAA3QW Posts: 55 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hey guys, how are we supposed to implement the SearchContextAwareQueryInterface in the PersonalizedProductQueryPlugin exactly? I.e., how should the setSearchContext() and getSearchContext() look like?

  • U010DNAA3QW
    U010DNAA3QW Posts: 55 πŸ§‘πŸ»β€πŸš€ - Cadet

    OK found a solution in the SaleSearchQueryPlugin of the demoshop Client module ExampleProductSalePage, just create a new SearchContextTransfer in the setter:

    $searchContextTransfer = new SearchContextTransfer();
    $searchContextTransfer->setSourceIdentifier(static::SOURCE_IDENTIFIER);
    

    (just for somebody searching for this problem)

  • @UKHD8KTMF you had a look recently, right?

  • UKHD8KTMF
    UKHD8KTMF Posts: 393 πŸ§‘πŸ»β€πŸš€ - Cadet

    not this task, looking into it