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'm new in Spryker (Frontend), is it possible to use the standard twig `{{ dump() }}` method

U01AM1YGRC2
U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello. I'm new in Spryker (Frontend), is it possible to use the standard twig {{ dump() }} method without getting the Fail Whale, anyway is it possible to disable the Fail Whale? Currently I use the docker/sdk logs, but it's a bit bad readable, so a debug (Stack Trace) or Twig dump would be very great πŸ‘ I'm would be pleased to get some input πŸ™‚ Thanks so far.

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited September 2020

    Hi Norman, what is the version of the demo shop your project started with?

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet
    version: "0.1"
    
    namespace: spryker_b2b_dev
    tag: 'dev'
    
    environment: docker
    image: spryker/php:7.2-alpine3.9
    
  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    and with spryker/docker-sdk.git -b 1.18.4

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    i've a look at the version from composer

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    This is not I'm asking about but ok, at least it seems that the project is older than latest v202009.0 of the demoshop.

    In this case you'll need to apply the patch I attached.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice
    edited September 2020

    And here are config entries responsible for rendering different types of error pages:

    FailWhale

    $config[ErrorHandlerConstants::ERROR_RENDERER] = WebHtmlErrorRenderer::class;
    

    Exception

    $config[ErrorHandlerConstants::DISPLAY_ERRORS] = true;
    $config[ErrorHandlerConstants::ERROR_RENDERER] = WebExceptionErrorRenderer::class;
    
  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    As I wrote I'm new at the topic, maybe you can tell me how I find the version number you got?

    And so far, thanks for the help I'll try your suggestions.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Just check your composer.lock file and search for something like spryker-feature. There you should be able to see what version of feature and therefore shop has been used.

  • U01AM1YGRC2
    U01AM1YGRC2 Posts: 71 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ah! πŸ˜‰ I see, big thanks! I haven't noticed it yet and it's currently at 202001.0, so you guessed right.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    In case of 202001.0 that patch above should help you to be able to dump in twig.
    It's fixed in the latest version already.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Valerii, i tried this patch in our project (because we use now a custom twig dump function) and i see that we have another problem..
    (we did not released in our project 202009.0)!

    With ShopApplicationConstants::ENABLE_APPLICATION_DEBUG set to true then some extends in twig does not work more properly..

    Our context now is the following:
    β€’ we have the default template from spryker original and up-to-date 202001 + some project level migration during composer update
    β€’ we have own el_default template
    β€’ in some components instead to overwrite the whole content we extends the default component (that extends the component from core level) with this extends command i.e. {% extends '@ShopUi/../default/components/molecules/quantity-counter/quantity-counter.twig' %}
    β€’ With ShopApplicationConstants::ENABLE_APPLICATION_DEBUGset to true these extends does not work more properly --> for example the define data does not merge more the data from default and el_default but it see only the data from el_default.
    Is there a possibility to get this working or we have to schedule in our project maybe to remove el_default and use only default template (after migration internally)? I dont want to have el_default components that are 99% just a copy from vendor and only mayve only one line changed/added/removed...

    Thanks in advance.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Hi Giovanni, sorry, it's hard to answer straight away, I\we need some time to investigate\clarify this input. And unfortunately we have some tickets in our queue. So could you please create a ticket so we won't lose it here?
    Thanks!

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ok, thanks!!!

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Valerii, some news about this problem or u did not get time to ask forward?

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Hi Giovanni, I asked to create a support ticket:

    So could you please create a ticket so we won't lose it here?

    Someone will try to reproduce it.

  • giovanni.piemontese
    giovanni.piemontese Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Ops... u are right.. sorry..!!!! 😞 i will create it today...