Posted on: 09/18/18 06:22pm
By: OMAL
Preview for the images that have relative paths for their sources are broken, and they are not broken only when the paths are absolute.
Can you fix this in the future?
Perhaps it is not a problem if you just start using the latest geeklog. But it becomes a problem when html articles are imported from other systems.
Re: preview on editor
Posted on: 09/19/18 07:07am
By: Laugh
when html articles are imported from other systems.
What do you mean by this? Are you just copying and pasting the articles into the editor? This has always been a tricky prospect for coders and most editors (and word processing programs) can have issues as some editors and programs like MS Word add there own tags and classes.
Did you want to add a bug report for it?
https://github.com/Geeklog-Core/geeklog/issues
and give a few examples.
Re: preview on editor
Posted on: 09/19/18 07:44am
By: OMAL
Quote by: Laughwhen html articles are imported from other systems.
What do you mean by this?
Think about that you have an old geeklog web site like this:
example.com/index.php
Then you update the website from the old one to a new domain, and also it's subdomain:
newexample.com/mydomain/index.php
Originally, your source codes are something like <img src="http://example.com/images/a.jpg" >
and now you have to modify the url for images.
You can modifiy like this:
<img src="http://newexample.com/mydomain/images/a.jpg" >
All you have to do is replace "example.com/" with "newexample.com/mydomain/"
But someone may consider the future situation and don't want to be bothered, so he/she may want to modify the original codes like this:
<img src="./images/a.jpg" >
Now all you have to do is replace "http://newexample.com/mydomain/" with "./" and this is just once.
For the latter case, if you use geeklog, preview is shown broken, so you have to change the image url to absolute path if you want to use preview .
This is what it meant.
Re: preview on editor
Posted on: 09/19/18 10:34am
By: Laugh
Ok I see what you mean, we already have something that does this built into the install.
It is called migrate and is located in the Geeklog install. For your Geeklog version add the install directory back in the admin directory (make sure to use the install that matches your version). Run it and then choose the migrate option. It will then ask for your new server settings and then proceed to migrate your config settings including checking articles, staticpages, forum posts (and other things if the plugins supports it) for relative paths and updating them.
You can also migrate and upgrade at the same time to the latest Geeklog version but that would obviously require to add all the latest Geeklog files.
Re: preview on editor
Posted on: 09/20/18 02:44pm
By: OMAL
OK I'll try it when the time comes.