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

Potential issue with fluid #9223

Closed
jptissot opened this issue Apr 18, 2021 · 5 comments
Closed

Potential issue with fluid #9223

jptissot opened this issue Apr 18, 2021 · 5 comments
Labels

Comments

@jptissot
Copy link
Member

Describe the bug

Not 100% sure what is happening. The bug seems to be intermittent. Sometimes the data does not load properly on the following page: https://github.com/StatCan/StatCan.OrchardCore/blob/master/src/Modules/StatCan.OrchardCore.Hackathon/Views/Widget-TeamDashboardWidget.liquid#L5

Sometimes the teamContentItemId is null when it should not be. I doubled check the database (postgresql) and the data is there. Plus, reloading the page a random number of times sometimes set's that variable properly, sometimes not.

Adding this to the view below the variables:

Variable: {{teamContentItemId}} <hr/>
Direct(.first): {{user.Properties.Hacker.Hacker.Team.ContentItemIds.first}} <hr/>
Direct(first filter): {{user.Properties.Hacker.Hacker.Team.ContentItemIds | first}} <hr/>
Team: {{team.ContentItem.Content}}

Outputs this:
image

@jptissot
Copy link
Member Author

jptissot commented Apr 18, 2021

Odd thing is that this if executes properly (true) but the teamContentItemId variable is blank ?
https://github.com/StatCan/StatCan.OrchardCore/blob/master/src/Modules/StatCan.OrchardCore.Hackathon/Views/Widget-TeamDashboardWidget.liquid#L12

@jptissot
Copy link
Member Author

Reloading the page multiple times displays properly, totally random:

image

@jtkech
Copy link
Member

jtkech commented Apr 19, 2021

It doesn't fix the issue but in your liquid better to use != nil in place of != null.

@jptissot
Copy link
Member Author

I am pretty sure this issue stems from this fluid pr: sebastienros/fluid#303

@jptissot
Copy link
Member Author

This commit fixes the issue: sebastienros/fluid@9066957

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants