Skip to content

PHP widget with syntax error brings down site #16740

@BobRay

Description

@BobRay

Bug report

Summary

A PHP-type widget with a syntax error causes 500 error and blank screen for entire site.

Step to reproduce

Create a PHP-type widget with this code:

<?php
return "Hello World;"

Reload page.

Observed behavior

xxxxxx.modx.dev is currently unable to handle this request. HTTP ERROR 500

Nothing in error log.

Expected behavior

Clearer error.

This may be unavoidable, but the effect seems unnecessarily catastrophic.

On initial visit to the site, you don't even see the login screen. The 500 hundred error shows up immediately. I didn't expect that the widget code would be "included" before the login screen was rendered. That seems unnecessary.

Environment

MODX Cloud, but I think any install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue in the code or project, which should be addressed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions