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

Internal link issue with custom savedir #107

Closed
tuudik opened this issue Sep 16, 2015 · 16 comments
Closed

Internal link issue with custom savedir #107

tuudik opened this issue Sep 16, 2015 · 16 comments

Comments

@tuudik
Copy link

tuudik commented Sep 16, 2015

When using custom savedir for Dokuwiki then using CKG Edit link creator to create internal link, it creates incorrect link.

Expected link:
:documents:somepage

Reality:
:data01:virt111:domain:www.page.com:dataDir:wiki_data:pages:documents:action_plan

@turnermm
Copy link
Owner

I'm afraid some changes I made had unintended side effects and the path to the aternate savedir became corrupted. I'm afraid this is not a quick fix. In the meantime if you want to use ckgedit you will have to use the default savedir.

@tuudik
Copy link
Author

tuudik commented Sep 16, 2015

Using default savedir is unfortunately not an option atm for me. But I'll wait for the fix. Tried to understand myself where it has gone broken but couldnt find the correct place.

@turnermm
Copy link
Owner

As it turns out, the alternate savedir seems to be working. The following page was created after I moved the data directory to an alternate location:
http://mturner.org/xen_server/test/savedir
It was created with ckgedit.

If you have made any changes to the code, reinstall the plugin. Delete the entire contents of the cache directory (data/cache). Make sure that the links in /lib/plugins/ckgedit/fckeditor/userfiles
all point to <your_save_dir>/media/. These links are:
file flash image media

Refresh you browser cache and delete any cookies relating to ckgedit and dokuwiki. Then restart your browser.

@turnermm
Copy link
Owner

I've been playing with this and there does seem to be a problem. It seems to be browser-dependent, at least to some extent. Which means it 's probably in the Javascript. I'll continue to look.

@turnermm
Copy link
Owner

I've made some fixes. See the savedir branch of cgkedit:
https://github.com/turnermm/ckgedit/archive/savedir.zip
See https://www.dokuwiki.org/doku.php?id=plugin:ckgedit#configuration_and_set-up
And see the instructions on the fckgLite web site,which apply here as well:
https://www.dokuwiki.org/plugin:ckgedit#alternate_save_directory

@tuudik
Copy link
Author

tuudik commented Sep 17, 2015

Yes!
It works:)

What I did:
My dokuwiki runs on Linux machine.
nix_style and win_style - false(un-checked)
I un-installed old CKG edit plugin.
I cleared the cache (rm "savedir"/cache).
Installed the plugin from the link you provided.
Under /lib/plugins/ckgedit/fckeditor/userfiles there were only htaccess files and blink.jpg so didn't touch there anything.
Browser cache cleared.
Re-login.
Works:)

@turnermm
Copy link
Owner

But you need the symbolic links to your data/media in userfiles for access to your media files

@tuudik
Copy link
Author

tuudik commented Sep 17, 2015

I use shared hosting, so it's quite complicated to create symlink:/

@turnermm
Copy link
Owner

I just checked my code -- it's been a while since I looked at it -- and I see that symlinks should be created for you if you install an updated version.

@turnermm
Copy link
Owner

You can force symlink creation by removing the file data/meta/fckl/symchk.meta

@tuudik
Copy link
Author

tuudik commented Sep 17, 2015

Perfect! Works like a charm now:) Thank you!:)

@pascal-my
Copy link

Hello,
I face the same issue when creating an internaI link.

I was using Release Dokuwiki 2016-06-26a "Elenor of Tsort".
I upgraded it to the last 2018-04-22b "Greebo" with the last version of Ckgedit but I still have the issue.

The "internal link" field is filled like this :
":var:www:dokudata:data:pages:appli_services:start"
instead of
"appli_services:start"
It seems that the folder path is added.

If I use the DW file browser to create the same link, the "internal link" field is correctly filled with :
"appli_services:start"

I followed the steps :
-> My dokuwiki runs on Linux machine.
-> nix_style and win_style - false(un-checked)
-> I un-installed old CKG edit plugin.
-> I cleared the cache (rm "savedir"/cache).
-> Installed the plugin from git
-> Under /lib/plugins/ckgedit/fckeditor/userfiles there is only htaccess files and blink.jpg and the 4 symlinks.
-> Browser cache cleared.
-> Re-login.
No Working :(

I have not the issue with an internal media.
Where can I look for a misconfiguration ?

Thanks !
Pascal

@turnermm
Copy link
Owner

Internal links are not governed by the links in userfiles; the links in userfiles are configured for media files. If your savedir is correctly configured in the Configuration Manager, these links will be created by ckgedit and will point to your media directory.

The path to your wiki files in data/pages does not need any special configuration.

Where is your dokuwiki located? Is it in the DocumentRoot?

@turnermm
Copy link
Owner

@pascal-my
Copy link

Hello Myron !
I finally found my mistake and it works. I was pretty sure was a misconfiguration but I was to close to see it !
In the field "savedir", I enter a path with a / at the end : "/var/dokudata/data/"
I removed it ("/var/dokudata/data") and everything works :
Thanks you for you support
(I updated the page https://www.dokuwiki.org/plugin:ckgedit:discussion_4, § "Internal link built incorrectly ?", it was me 3 years ago :) )

@turnermm
Copy link
Owner

Yes. The default is ./data, without the trailing forward slash. Any way, this recent gave me the chance to re-check the code and make sure all was ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants