Skip to content

[2.1] Improve error reporting when a loop is detected #7801

Open

Description

@sbulen

Description

In our error functions, we have some pretty good loop detection, and even produce a backtrace when a loop is detected.

BUT...

We do not capture the actual error that caused the loop. We just display the backtrace:

die('Error loop.');

We need to display the actual db error message as well.

Knowing we are in a loop isn't anywhere near as helpful as knowing WHY we're in a loop...

We have seen a couple of these lately...

Additional information/references

Without the error, you're flying blind, as in these forum support requests:
https://www.simplemachines.org/community/index.php?topic=586471.0
https://www.simplemachines.org/community/index.php?topic=586373.0

Activity

  1. sbulen commented on Mar 31, 2025

    @sbulen
    ContributorAuthor
  2. changed the title [-]Improve error reporting when a loop is detected[/-] [+][2.1] Improve error reporting when a loop is detected[/+] on Mar 31, 2025
  3. jdarwood007 commented on Oct 25, 2026

    @jdarwood007
    Member

    The problem here is we don't want to drop a bunch of what could be sensitive info. So only in a developer environment would we want to issue something like a debug backtrace.
    We could attempt to write to the cachedir for something like $cachedir . '/loop-crash.log' or similar.

  4. added this to the 3.0 Alpha 6 milestone on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions