New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some display strings have invalid formatting that cannot be parsed #5402
Comments
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. |
1 similar comment
@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 |
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. |
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. |
Sure. Thanks for confirming. Note that in PHP WebApps reboot and the like is never required when using Apache. |
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.
The text was updated successfully, but these errors were encountered: