You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The logic for fetching CMS blocks in core/modules/cms/store/block/actions.ts goes straight to cache if at least ONE block is already in it even if the requested block is not in cache resulting in an error. Same thing with CMS Pages.
if (skipCache || (!state.items || state.items.length === 0))
Expected behavior
Only load block from cache, if the requested block is present in cache.
Steps to reproduce the issue
Have 2 different CMS blocks included in 2 different pages.
Go to first Page: CMS Block is loaded and stored in VUEX
Go to second page (no hard reload): Second CMS Block is requested from Store although it is not in there.
The text was updated successfully, but these errors were encountered:
@filrak@pkarw I look into the code and I cannot check the case where there is some CmsBlock displayed in Vuex state. Even if we add 2 cms blocks on one page, on the beginning on the single action, the state.items it's empty. Like cache doesn't work here. I don't know how to resolve this isue
Yeah, I believe that if (skipCache || (!state.items || state.items.length === 0)) is kind of premature optimization and therefore should be simply removed
Current behavior
The logic for fetching CMS blocks in
core/modules/cms/store/block/actions.ts
goes straight to cache if at least ONE block is already in it even if the requested block is not in cache resulting in an error. Same thing with CMS Pages.Expected behavior
Only load block from cache, if the requested block is present in cache.
Steps to reproduce the issue
The text was updated successfully, but these errors were encountered: