Skip to content
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

When viewing a graph, Edit Graph Template link may open wrong url #5236

Closed
jlrcontegix opened this issue Feb 15, 2023 · 11 comments
Closed

When viewing a graph, Edit Graph Template link may open wrong url #5236

jlrcontegix opened this issue Feb 15, 2023 · 11 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue

Comments

@jlrcontegix
Copy link

Describe the bug

In graph views where the "Edit Graph Template" button/link is displayed to the right of the graph, the link points to https://graph_templates.php/?action=template_edit&id=XX

All other links render properly.

To Reproduce

Steps to reproduce the behavior:

  1. Navigate to instance's /graph_view.php

  2. Click on "Edit Graph Template" next to a graph, or hover over link and view URL.

  3. Link renders without base_url value leading to an error from the browser.

Expected behavior

The link should render with the base_url like other links.

Desktop (please complete the following information)

  • OS: MacOS Ventura

  • Browser Chrome

  • Version 109

Additional context

The only difference from a typical install is we are not using /cacti/ as the url_path, but instead /. I have tinkered with the Server Base URL value in Settings, by completely removing it, trying just the FQDN, and also https://FQDN, but no change in link rendering.

Cacti Version: 1.2.23
PHP 8.2.3
CentOS 7

@jlrcontegix jlrcontegix added bug Undesired behaviour unverified Some days we don't have a clue labels Feb 15, 2023
@TheWitness
Copy link
Member

This appears to be more of a configuration issue on your part.

@TheWitness
Copy link
Member

The default $url_path should be '/cacti/'

@TheWitness TheWitness added question A question not a bug not a bug Not a bug as determined by dev and removed bug Undesired behaviour unverified Some days we don't have a clue labels Feb 16, 2023
@jlrcontegix
Copy link
Author

That's the default, but why give the option if you can't change it? We do not want to deploy Cacti at /cacti/ and never have.

@TheWitness
Copy link
Member

You can change it in config.php.

@jlrcontegix
Copy link
Author

Perhaps I was not clear enough, I have $url_path defined in config.php as '/'. Only the Edit Graph Template link next to graphs renders incorrectly.

@jlrcontegix
Copy link
Author

On an instance where /cacti/ is used there is an extra slash rendered in the Edit Graph Template link:

https://some.url.tld/cacti//graph_templates.php?action=template_edit&id=100

@TheWitness
Copy link
Member

Can you show a screen shot of where this link it highlighting the screen shot so that I know specifically where you are experiencing the bad link?

@TheWitness TheWitness reopened this Feb 18, 2023
@jlrcontegix
Copy link
Author

Sure thing, and sorry about the base_url confusion, I've been working on migrating another app with a proxy issue rendering links incorrectly with that variable and got my wires crossed.
image

@TheWitness
Copy link
Member

Cool, that helps. It's the slash at the end of the .php that is causing the issue.

@TheWitness TheWitness added bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue and removed question A question not a bug not a bug Not a bug as determined by dev labels Feb 19, 2023
@TheWitness
Copy link
Member

Resolved in the soon to be merged #5238

@TheWitness TheWitness added the porting required Requires porting to develop label Feb 19, 2023
@netniV netniV changed the title Edit Graph Template link missing base_url When viewing a graph, Edit Graph Template link may load wrong url Feb 20, 2023
@netniV netniV changed the title When viewing a graph, Edit Graph Template link may load wrong url When viewing a graph, Edit Graph Template link may openwrong url Feb 20, 2023
@netniV netniV changed the title When viewing a graph, Edit Graph Template link may openwrong url When viewing a graph, Edit Graph Template link may open wrong url Feb 20, 2023
netniV pushed a commit that referenced this issue Feb 20, 2023
Fixing #5238 - SQL Issues due to non-visible chars
Fixing #5232 Poller Stacking
Fixing #5236 - Edit Graph Template
Fixing #5243 - Export columns missing
@TheWitness TheWitness removed the porting required Requires porting to develop label Feb 20, 2023
@TheWitness
Copy link
Member

All ported to 1.3.x now.

netniV pushed a commit that referenced this issue Feb 24, 2023
Fixing #5238 - SQL Issues due to non-visible chars
Fixing #5232 Poller Stacking
Fixing #5236 - Edit Graph Template
Fixing #5243 - Export columns missing
Fixing Issue #5239 - Automation SNMP Bulk Size
Fixing #5241 - Polling distribution not working
Fixing #5247 and QA on #5241 - Polling Issues
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

2 participants