putyourlightson / craft-campaign

Send and manage email campaigns, contacts and mailing lists in Craft CMS.
https://putyourlightson.com/plugins/campaign
Other
64 stars 24 forks source link

Error Message: "Unauthorized Access" When Previewing HTML Body of Sendouts #364

Closed watarutmnh closed 1 year ago

watarutmnh commented 1 year ago

I can't preview HTML Body of sendouts preview with a error "Unauthorized: You don’t have the proper credentials to access this page.". inside the preview frame.

screenshot_2023-02-03 17 36 18

Craft: 3.7.63.1 Campaign: 1.24.1 MJML: 1.0.6

bencroker commented 1 year ago

Can you please check the Console and Network tabs in your browser dev tools? The preview is loaded via an iframe and I wonder if the domain name is different to the one used in your control panel.

watarutmnh commented 1 year ago

@bencroker In the network tab, I can confirm that the URL for the preview request is different from that of the control panel.

The situation is that there are two websites, A and B, running. A has been designated as the primary site, but the URL for the control panel has been set to match that of site B. My campaigns and sendouts belong to site B, however, the URL requested in the preview of the domain is for site A.

watarutmnh commented 1 year ago

I understand that the issue can be resolved by changing the primary site from A to B, but I believe it would be better if sendouts could preview without encountering errors related to site settings.

bencroker commented 1 year ago

It looks like this issue has already been resolved in Campaign 2 (for Craft 4), are you able to update to it?

watarutmnh commented 1 year ago

I see, I realized that it's time to upgrade to version 4 soon. Thank you for letting me know!