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

Admin context needs a better error page template #9327

Closed
hypeJunction opened this Issue Jan 29, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@hypeJunction
Contributor

hypeJunction commented Jan 29, 2016

Forwarding with an error code in admin context breaks the page:

admin-error

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

Is there an easy way to duplicate this?

Member

mrclay commented Jan 29, 2016

Is there an easy way to duplicate this?

@hypeJunction

This comment has been minimized.

Show comment
Hide comment
@hypeJunction

hypeJunction Jan 29, 2016

Contributor

forward('', '400'); from any of the admin views.

Contributor

hypeJunction commented Jan 29, 2016

forward('', '400'); from any of the admin views.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

Added forward('', '400') to top of flush_cache.php and I get the Bad Request page with no problems.

Member

mrclay commented Jan 29, 2016

Added forward('', '400') to top of flush_cache.php and I get the Bad Request page with no problems.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

oh, views..

Member

mrclay commented Jan 29, 2016

oh, views..

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

Ugh, pagesetup doesn't get to fire and that's where CSS is registered and menu items registered.

Member

mrclay commented Jan 29, 2016

Ugh, pagesetup doesn't get to fire and that's where CSS is registered and menu items registered.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

The behavior of forward('', '400') (dump an error page without redirecting) is a general source of problems. The resources/error view wrongly assumes that the CSS/JS of the page have been adequately set up. In the case of admin/ pages, the page handler has unregistered the default CSS.

Member

mrclay commented Jan 29, 2016

The behavior of forward('', '400') (dump an error page without redirecting) is a general source of problems. The resources/error view wrongly assumes that the CSS/JS of the page have been adequately set up. In the case of admin/ pages, the page handler has unregistered the default CSS.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay

mrclay Jan 29, 2016

Member

See in _elgg_admin_page_handler:

elgg_unregister_css('elgg');
elgg_require_js('elgg/admin');

Maybe we just move these lines after the admin view is rendered.

Member

mrclay commented Jan 29, 2016

See in _elgg_admin_page_handler:

elgg_unregister_css('elgg');
elgg_require_js('elgg/admin');

Maybe we just move these lines after the admin view is rendered.

@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay
Member

mrclay commented Jan 29, 2016

PR #9328

@mrclay mrclay closed this in c0b1a70 Feb 9, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment