Fixed Marking alert as read/unread does not respect $redirect

Affected version
2.2.1

TickTackk

Well-known member
First in template account_alerts_mark_read this:
HTML:
    <xf:redirect />
    <xf:hiddenval name="unread">{{ $newUnreadStatus ? 1 : 0 }}</xf:hiddenval>
</xf:form>
should be:
HTML:
    <xf:redirect url="{$redirect}" />
    <xf:hiddenval name="unread">{{ $newUnreadStatus ? 1 : 0 }}</xf:hiddenval>
</xf:form>

Then in XF\Pub\Controller\Account::actionAlertToggle() this:
PHP:
        $redirect = $this->buildLink('account/alerts');
should be:
PHP:
        $redirect = $this->getDynamicRedirect($this->buildLink('account/alerts'));

Edit: If someone were to go to page 69 and then open the "Mark as read" or "Mark as unread" for an alert in a new tab, click submit then they would be redirected back to page 1 instead of the last page they were on.
 
Last edited:

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.2).

Change log:
Fix dynamic redirects for alert and conversation read state toggles
There may be a delay before changes are rolled out to the XenForo Community.
 
Top