Relative URLs fix
-
Hi Alex,
I think your Easy Site Importer is simply amazing.
The best plugin I have seen in a loooong time.
Thank you for it.
I wanted to just drop you a note of a quick fix I made while
attempting to use it on a sample site I was trying to import.The site uses relative URL’s so for example on the following URL:
https://domain.com/directory/some-page.php
There would be links that look like:
<a href="another-page.php">Facts About Stuff</a>
On line 883 of code in:
/plugins/easy-site-importer/class/class-spider.php
It states:
$formatted_link='/'.$formatted_link;
Which causes this link to become:
https://domain.com/another-page.php
But it needs to become:
https://domain.com/directory/another-page.php
So i fixed this by changing line 883 to:
$formatted_dir = ($path_parts_info['dirname'] == '/' ? '/' : $path_parts_info['dirname'].'/'); $formatted_link=$formatted_dir.$formatted_link;
I’d love to help you whenever I make updates to the codebase, so if I
do I’ll continue to shoot things over via email as I plan to
definitely try and use this amazing tool you have made. If you get a
chance please reply with your email address regarding this plugin, because I tried both from your website and they both bounce.If you ever want a guinea pig to test out new versions or any feedback
I’d love to help in anyway I can.Once again thank you so much for creating this amazing tool, it can be
a total life saver for many people.
- The topic ‘Relative URLs fix’ is closed to new replies.