Not Solved MyAlerts Issue (blocked by CORS policy)
Not Solved
Hi there. After adding new myalerts_headericon template code for my theme Spectral, I received an error code in the console when clicking the alerts header icon:

jquery.js?ver=1820:2 Access to XMLHttpRequest at 'javascript:void(0)' from origin '' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

When the alerts icon is clicked, the alerts "modal" will open in the footer and I will have to scroll down to view it.

<a href="javascript:void(0)" class="myalerts open_modal tooltip-s action-link" title="{$lang->myalerts_alerts}" data-selector="#myalerts_alerts_modal" rel="modal:open" onclick="MyBB.popupWindow('/alerts.php?modal=1&amp;ret_link={$myalerts_return_link}', { fadeDuration: 250, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;">
<i class="far fa-fw fa-bell"></i>
<span class="indicator" data-number="{$mybb->user['unreadAlerts']}"></span>

Any help would be great. I attempted to add to the onclick, but it did not seem to help
Not Solved
See if changing href="javascript:void(0)" to href="{$mybb->settings['bburl']}/alerts.php" helps. (DF3A 34D9 A627 42E5 BC6A 6750 1F2F B8AA 28FF E1BC) ▪
Not Solved
(2019-09-21, 04:55 PM)Devilshakerz Wrote: See if changing href="javascript:void(0)" to href="{$mybb->settings['bburl']}/alerts.php" helps.

Did not work with the modal. Instead I uninstalled MyAlerts, installed a brand new installation of MyAlerts, replaced all files, activated again, and it is working now.

However, it did get rid of the console error, it just did not do the job properly

Forum Jump:

Users browsing this thread: 1 Guest(s)