Skip to content

feat: fixing scheduling options #13

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

Open
wants to merge 1 commit into
base: feat/firefox-version
Choose a base branch
from

Conversation

asamzaman87
Copy link
Contributor

@asamzaman87 asamzaman87 commented Nov 22, 2024

Problem Description:

Users are experiencing an issue where the scheduling options modal did not display any tiers or scheduling options. This made it impossible to schedule posts properly. Upon investigation, it was found that the data variable in the OverlayView component, which should contain access rules and tier information, was undefined or an empty array.

Possible Cause of the Problem:

The root cause was identified in the fetch intercepting script (fetchIntercepts.js). The script was using window.parent.postMessage to send messages containing the access rules data to the OverlayView component. However, since both the fetch intercepting script and the OverlayView component are running in the same window context (not within an iframe), using window.parent.postMessage caused the messages to be lost or not received.

As a result, the handleMessage event listener in the OverlayView component did not receive the messages, leading to the scheduling options modal remaining empty.

Possible Solution:

By changing to window.postMessage, messages containing the access rules data are successfully sent to and received by the OverlayView component. The handleMessage event listener now correctly receives these messages, allowing the access rules data to be processed and stored. Consequently, the data variable is populated with the access rules, and the scheduling options modal displays the tiers and scheduling options as expected.

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

Successfully merging this pull request may close these issues.

1 participant