victoire
victoire copied to clipboard
Refactor Criteria Architecture
Criteria comparison is too strict (1 === true => false)
Description
I want a widget to show only for authenticated users then Criterias is supposed to be the solution:
I create my widget and specify the following criteria request_user equal 1
.
But the content isn't displayed.
After digging, the following line : https://github.com/Victoire/victoire/commit/dd5633f03d862bac993898643dfed6106b0d29e0#diff-a3d5dd0acce1865308353da827fd2dadR62 is problematic because the current comparison is 1 === true
.
Resolution Ideas
Don't use true and false and prefer a unique equal operand. Check #897
Related to
Bundle | -- | -- | -- |
---|---|---|---|
Analytics | Page | ||
Blog | Query | ||
BusinessEntity | Seo | ||
BusinessPage | Sitemap | ||
Core | Template | ||
Criteria | ✔ | Twig | |
Filter | User | ||
Form | ViewReference | ||
I18n | Widget | ||
Media | WidgetMap |