Skip to content

Some display strings have invalid formatting that cannot be parsed #5402

@jimidak

Description

@jimidak

Describe the bug

PHP string var substitution

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
    Management. --> Trees --> (could be any tree)

  2. Click on '....'
    some tree, and then "Edit Tree"

  3. See error
    "This tree has been locked for Editing on %1$s by %2$s."

Expected behavior

"This tree has been locked for Editing on 2023-07-13 19:13:53 by admin."

A clear and concise description of what you expected to happen.
THE PHP TEMPLATE/VARIABLE POPULATED WITH ACTUAL TIMESTAMP & USER

Screenshots

Screenshot 2023-07-13 at 6 14 45 PM

Desktop (please complete the following information)

  • OS: [e.g. iOS]
    UBUNTU 20.04

  • Browser [e.g. chrome, safari]
    BRAVE

  • Version [e.g. 22]
    1.52.130

Additional context

tree.php - The 2 sprintf string variables (‘%1$s by %2$s’) are not getting substituted by the first and second parameters 'locked_date' & '(get_username($tree['modified_by’])'. Nothing in cacti logs or mysql (mariadb) logs.



versions:

OS Ubuntu 20.04.5 (5.4.0-137 kernel)
RRDtool 1.7.2-3 build2
NET-SNMP 5.8
PHP 7.4.3
MariaDB 10.5.18
Apache 2.4.41
Spine 1.2.23
Cacti 1.2.24

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourconfirmedBug is confirm by dev teamporting requiredRequires porting to developresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions