Hi,
I'm running 1.2.26, migrated from 0.8.8h.
Everything seems to be good so far.
Except on the import template page.
When I load an XML, the page is trying to load : https://templates_import.php/?preview_only=true
So my browser block for a Cross-Origin Request as the URL isn't well formatted.
My server base URL (base_url) = https://cacti.mydomain.net/
My $url_path = '/';
What can cause the URL for this call to be like that ?
Bad url on template_import.php causing Cross-Origin Request
Moderators: Developers, Moderators
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Bad url on template_import.php causing Cross-Origin Request
Report that in GitHub and for the time being save the XML to a file and import using a file.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Bad url on template_import.php causing Cross-Origin Request
I will open an issue in GitHub, but I am already importing using a XML file.
It's after uploading the XML file that the page refresh trying to open https://templates_import.php/?preview_only=true for the preview before the real import.
On others testing environment of Cacti 1.2.26 that have, this preview works well.
I am wondering if it's related to the migration, a recent change on the base_url or environment (php, apache, ...).
I will try to install a fresh 1.2.26 on the same server to eliminate apache/php.
It's after uploading the XML file that the page refresh trying to open https://templates_import.php/?preview_only=true for the preview before the real import.
On others testing environment of Cacti 1.2.26 that have, this preview works well.
I am wondering if it's related to the migration, a recent change on the base_url or environment (php, apache, ...).
I will try to install a fresh 1.2.26 on the same server to eliminate apache/php.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Bad url on template_import.php causing Cross-Origin Request
Edit line 490 in templates_import.php and change to:
Let us know if that fixes it.
Code: Select all
url: (urlPath != '/' ? urlPath + '/':'') + 'templates_import.php?preview_only=true',
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Bad url on template_import.php causing Cross-Origin Request
Thank you, it's working with this fix.
I've created the following report to trace the issue :
https://github.com/Cacti/cacti/issues/5701
I've created the following report to trace the issue :
https://github.com/Cacti/cacti/issues/5701
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Bad url on template_import.php causing Cross-Origin Request
Thanks for the bug report and thanks for confirming.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Who is online
Users browsing this forum: No registered users and 0 guests