Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snippet area returns empty snippet instead of null if it does not exist in specific locale #5566

Open
alexander-schranz opened this issue Oct 23, 2020 · 0 comments
Labels
Bug Error or unexpected behavior of already existing functionality

Comments

@alexander-schranz
Copy link
Member

alexander-schranz commented Oct 23, 2020

Q A
Sulu Version 2.1.2
Browser Version -

Actual Behavior

Snippet area returns empty snippet instead of null if it does not exist in specific locale.

Expected Behavior

Should return null.

Steps to Reproduce

  1. create snippet area
  2. create new snippet in language en
  3. choose as default snippet
  4. use {% set extranet = sulu_snippet_load_by_area('extranet') %}
  5. go to website
  6. change language to de
  7. {{ dump(extranet) }} will return a snippet with empty strings if it does not exist:

Bildschirmfoto 2020-10-23 um 11 09 24

the whole extranet object should return here null instead.

Possible Solutions

I think something like ghost_load false or so is missing here.

@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

No branches or pull requests

1 participant