You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When viewing a graph, option to edit template may lead to incorrect URL #5573
Actually, this a a bug, and url_path should not be an empty string.
There is an extra slash on https://github.com/Cacti/cacti/blob/develop/graph.php#L171
if url_path is set to /cacti/
then the url ends up as /cacti//graph_templates.php?action=template_edit&id=1
changed the title [-]Incorrect URL for editing graph template. Perhaps typo.[/-][+]When viewing a graph, option to edit template may lead to incorrect URL[/+]on Dec 16, 2023
Activity
TheWitness commentedon Nov 16, 2023
What is your url_path in config.php? I think it may be wrong.
TheWitness commentedon Nov 16, 2023
It's normally $url_path = '/cacti/'. My guess is that yours is simply '/'.
Vladyslav78956785786576 commentedon Nov 16, 2023
yes.
$url_path = '/';TheWitness commentedon Nov 16, 2023
Change it to an empty string. What happens then?
Vladyslav78956785786576 commentedon Nov 16, 2023
I did an additional Ctrl + F5 and everything worked!
TheWitness commentedon Nov 16, 2023
Which page, and did you change the url_path? Does it work with the standard
$url_path='/cacti/';?Vladyslav78956785786576 commentedon Nov 16, 2023
My web server is configured to use the full URI - http://10.10.10.10/
TheWitness commentedon Nov 16, 2023
So,
$config['url_path']should be the empty string '';cigamit commentedon Nov 16, 2023
Actually, this a a bug, and url_path should not be an empty string.
There is an extra slash on
https://github.com/Cacti/cacti/blob/develop/graph.php#L171
if url_path is set to /cacti/
then the url ends up as /cacti//graph_templates.php?action=template_edit&id=1
Also looks like line
https://github.com/Cacti/cacti/blob/develop/graph.php#L444
has the issue also
cigamit commentedon Nov 16, 2023
Only other 2 I found where at
https://github.com/Cacti/cacti/blob/develop/help.php#L89
https://github.com/Cacti/cacti/blob/develop/lib/data_query.php#L76
Fix errant slash in url paths
Fix errant slash in url paths
TheWitness commentedon Nov 16, 2023
Closing. Thanks @cigamit !
netniV commentedon Nov 17, 2023
Was the CHANGELOG updated for this issue?
TheWitness commentedon Nov 18, 2023
It is there now.
[-]Incorrect URL for editing graph template. Perhaps typo.[/-][+]When viewing a graph, option to edit template may lead to incorrect URL[/+]