Skip to content

Redis master replica sync delay or Disable Translations cache causes "Required parameter 'theme_dir' was not passed" error #900

@hyq-csi-001

Description

@hyq-csi-001

Preconditions (*)

1.Reproduced in clean Magento version 2.4.7-p3
2.Installing and configuring Redis master and slave
Image
The settings file is as follows
Image

Steps to reproduce (*)

There are two ways to reproduce:
①Redis master replica sync delay
1.Simulating master-slave delay
A.Cancel master-slave synchronization
Image
B.Delete the db0 data from the slave database
Image
Image

2.Administrator user login backend
3.Create a CMS block with any content
Image
Image
4.Create a CMS page and associate the content of the page with the block in step 2
5.Open the editing screen for the CMS page you created in step 3

②Disable Translations cache
1.Disable Translations cache in the background page
Image
2.Create a CMS block with any content
Image
3.Create a CMS page and associate the content of the page with the block in step 2
4.Open the editing screen for the CMS page you created in step 3

Expected result (*)

The screen is displayed correctly and no error messages are displayed. Preview content correctly displays the contents of the CMS blocks embedded in the CMS page.
Image

Actual result (*)

An error message appears. The contents of the CMS block embedded in the CMS page are not displayed.
Image

Additional information

Execution log:The error message "main.ERROR: Required parameter 'theme_dir' was not passed" is displayed.
Image

After investigating the data flow, we found that the cache is saved using the underlying Zend_Cache_Core::save method. Specifically, on line 407, the cache key is removed because the condition on line 405 is met:

if ($data !== $data2)

We suspect this is due to Redis replication lag — the data might not have been fully synced between the primary and replica at the time of the comparison. When only a single Redis primary instance is used (no replicas), this issue does not occur.

At this point, we’re unsure whether this behavior is caused by Magento or is inherent to Zend Framework’s caching logic.

Would appreciate any insights or similar findings from the community.

Metadata

Metadata

Assignees

Labels

Issue: ConfirmedPriority: P2Priority: P2Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions