Skip to content

Show delayed inline errors from print_header_redirect()#1955

Merged
dregad merged 2 commits intomantisbt:master-2.26from
dregad:i33480-delayed-inline-errors
Jan 24, 2024
Merged

Show delayed inline errors from print_header_redirect()#1955
dregad merged 2 commits intomantisbt:master-2.26from
dregad:i33480-delayed-inline-errors

Conversation

@dregad
Copy link
Copy Markdown
Member

@dregad dregad commented Jan 4, 2024

Following the deprecation of print_successful_redirect() function in issue #5189, calling it shows a blank page when $g_stop_on_errors = ON and $g_display_errors[E_USER_DEPRECATED] = DISPLAY_ERROR_INLINE because Mantis does not complete the redirection due to presence of a handled error.

print_header_redirect() now displays a basic "proceed" page, with redirection enabled only when $g_stop_on_errors = ON, allowing any delayed inline error messages to be shown.

Fixes #33480

@dregad dregad self-assigned this Jan 4, 2024
layout_page_begin();
echo '<br /><div class="center">';
print_link_button( $p_url, lang_get( 'proceed' ) );
echo '</div>';
Copy link
Copy Markdown
Member Author

@dregad dregad Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you think it would be better to call html_operation_successful( $p_url ); here instead of just printing a Proceed button.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your call!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll add the error message, I believe it makes things clearer for the user.

Following the deprecation of print_successful_redirect() function in
issue #5189, calling it shows a blank page when $g_stop_on_errors = ON
and $g_display_errors[E_USER_DEPRECATED] = DISPLAY_ERROR_INLINE because
Mantis does not complete the redirection due to presence of a handled
error.

print_header_redirect() now displays a basic "proceed" page, with
redirection enabled only when $g_stop_on_errors = ON, allowing any
delayed inline error messages to be shown.

Fixes #33480
When delayed inline error messages are displayed on a page with a
redirection, call html_operation_successful() to inform the user that
the operation completed successfully despite the errors.

Issue #33480
@dregad dregad force-pushed the i33480-delayed-inline-errors branch from ec3444c to 5e65518 Compare January 24, 2024 22:35
@dregad dregad merged commit 5e65518 into mantisbt:master-2.26 Jan 24, 2024
@dregad dregad deleted the i33480-delayed-inline-errors branch January 24, 2024 22:39
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.

2 participants