Repository navigation
Some display strings have invalid formatting that cannot be parsed #5402
Description
Activity
- addedbugUndesired behaviourUndesired behaviourunverifiedSome days we don't have a clueSome days we don't have a clue
on Jul 14, 2023 Thanks @jimidak. The debian dpk builds are a little different than source builds due to some issues with deprecated libraries. Thank for reporting though.
Thank you @TheWitness. Appreciate the feedback. This was probably better posted on the phpBB Cacti Forum, but if there's any help here I can get, it would be appreciated.
@jimidak, grab the global_languages.php from the 1.2.x branch and see if that fixes it. I distinctly remember this being reported before.
@jimidak, grab the global_languages.php from the 1.2.x branch and see if that fixes it. I distinctly remember this being reported before.
It was reported and fixed before.
@netniV , Sorry Mark, I searched issues, opened and closed, and couldn't find anything. Can you pls point me to it?
@TheWitness , replacing
global_languages.phpfrom the 1.2.x branch didn't seem to have any efffect.I'm pretty sure it was done as part of #5147 but there were a few other commits that addressed things too.
That said, @TheWitness did update login form in 3088272 for issue #5152 which seems to be this same issue so maybe that's why it sounds familar to us both. If so, it's still outstanding and we may need to double check for these usages?
@netniV Thanks for the follow-up. And that 5152 issue sure looks liek the same type of ordered placeholder issue
It'll be raining here in SE Michigan tomorrow. Will spend some time digging through it if you don't beat it tom me @netniV.
- changed the title
[-]tree.php - php tokens (%1$s by %2$s) not replaced by parameter, and printed literally in Cacti UI Tree Mode[/-][+]Cacti translations including less compatible language replacement characters in a few locations[/+]on Jul 15, 2023 - addedconfirmedBug is confirm by dev teamBug is confirm by dev teamand removedunverifiedSome days we don't have a clueSome days we don't have a clue
on Jul 15, 2023 - added a commit that references this issue
on Jul 15, 2023 - addedresolvedA fixed issueA fixed issueporting requiredRequires porting to developRequires porting to develop
on Jul 15, 2023 Grab a fresh copy of tree.php from the 1.2.x branch. I found this syntax in a few more locations as well and have resolved the same issue there.
@TheWitness , I downloaded the updated tree.php, rebooted the cacti server, logged back into the cacti UI, and tried again... and now it's working!! Thank you @TheWitness and @netniV, for your time and effort. Very appreciated.
When I unlock a tree for editing, now I get the time and username. ex.
This tree has been locked for Editing on 2023-07-17 10:32:00 by Jane DoeSure. Thanks for confirming. Note that in PHP WebApps reboot and the like is never required when using Apache.
- changed the title
[-]Cacti translations including less compatible language replacement characters in a few locations[/-][+]Some display strings have invalid formatting that cannot be parsed[/+]on Sep 3, 2023 - locked and limited conversation to collaborators
on Dec 3, 2023 - addedstatus:confirmedNamespaced Cacti workflow labelNamespaced Cacti workflow labeltype:bugNamespaced Cacti workflow labelNamespaced Cacti workflow label
on Aug 30, 2026
Describe the bug
PHP string var substitution
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Management. --> Trees --> (could be any tree)
Click on '....'
some tree, and then "Edit Tree"
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
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.