Skip to content

Prevents adding bugnotes when $g_log_level = LOG_DATABASE; #8

@dregad

Description

@dregad

When this plugin is enabled and logging is set to $g_log_level = LOG_DATABASE, this plugin prevents users from adding any bug notes, MantisBT throws

APPLICATION ERROR #600 - Note not found.

The problem occurs in bugnote_add() function, which inserts a record in bugnote_text table, then tries to retrieve the new record's ID. Since the plugin has itself inserted a new record into the mantis_plugin_EventLog_events_table (due to the log_event() call in DbQuery::log_query() ), db_insert_id() call in bugnote_add() gets the ID of the the latter instead of bugnote_text's.

Not sure how this race condition can be fixed.

As a workaround, disable the plugin when LOG_DATABASE is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions