CKEditor and KCFinder bundle

Version 3 Solutions you have discovered or come across should go here. Questions should go in the other three Version 3 forums, thank you.
Forum rules
Please do not ask questions here, this is for Version 3 Solutions you have discovered or come across.

Re: CKEditor and KCFinder bundle

Postby duncanc » 4:35pm, Tue 24 Dec, 2013

Delete the directory and use the value that I suggested. The value has to be relative to the public_html directory, you are using an absolute value.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: CKEditor and KCFinder bundle

Postby suhi » 4:45pm, Tue 24 Dec, 2013

duncanc wrote:Delete the directory and use the value that I suggested. The value has to be relative to the public_html directory, you are using an absolute value.


Please point out which value exactly did you have in mind. Have tried so many variations by now that I'm lost again .. but feels so close..

So many troubles and with clean install :/

Tnx
suhi
phpLister
 
Posts: 14
Joined: 12:44am, Mon 31 Jan, 2011

Re: CKEditor and KCFinder bundle

Postby duncanc » 6:06pm, Tue 24 Dec, 2013

The image directory needs to specified relative to the web root so probably should be 'eposta/upload_slike'.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: CKEditor and KCFinder bundle

Postby suhi » 7:00pm, Tue 24 Dec, 2013

duncanc wrote:
The image directory needs to specified relative to the web root so probably should be 'eposta/upload_slike'.


with this I get : Cannot write to upload folder. /mails/upload_slike
Can't create folder. Even if I create it and make it writable I get the same error.

When I try only with 'upload_slike'
(which probably means folder should be created at www.my-site/upload_slike
or home/metu01/domains/tems-us.si/public_html/

Instead the folder is created at the server root ..
Also all uploads go here
home/metu01/
bin
dev
domains
etc
home
upload_slike

The image link in the CKEditor is:
Code: Select all
http://www.my-site.com/upload_slike/files/image.jpg


Correct link, but the folder doesnt exist here as it was created way under in the server file structure

Tnx
suhi
phpLister
 
Posts: 14
Joined: 12:44am, Mon 31 Jan, 2011

Re: CKEditor and KCFinder bundle

Postby duncanc » 8:44pm, Tue 24 Dec, 2013

You appear to have an unusual configuration that causes the directory to be created in the wrong place.

You can try modifying the CKeditorPlugin.php file to specify the directory directly instead of it being derived from the URL

see line 75
Code: Select all
 'uploadURL' => sprintf('%s://%s/%s', $public_scheme, $website, ltrim(UPLOADIMAGES_DIR, '/'))

add this line immediately before it, but check that I have specified the path correctly:
Code: Select all
'uploadDir' => '/home/metu01/domains/tems-us.si/public_html/' . ltrim(UPLOADIMAGES_DIR, '/'),

with UPLOADIMAGES_DIR defined as eposta/upload_slike

I have never used that setting before so I am guessing that it would solve the problem.
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: CKEditor and KCFinder bundle

Postby suhi » 10:35pm, Tue 24 Dec, 2013

Great ! It works now :D. Thanky you very much.
I'm sure many will find this option very helpfull.

I'm still curious which settings could be unusual in my configuration to cause this problem.
This particular phplist install was fresh install, all seems to work well (also all other generated links ..), so I guess configuration file is set up OK. And this is the only active plugin I have, also fresh install.
The only difference is that the default user language is not english ...

Thanks !
suhi
phpLister
 
Posts: 14
Joined: 12:44am, Mon 31 Jan, 2011

Re: CKEditor and KCFinder bundle

Postby Craxx » 4:11pm, Mon 03 Feb, 2014

Hy i have the same problem like suhi.
But when i test the last solution i get also the message the directory is not writable....

Please i need some HELP. I also tried a new clean installation, but the same behaviour.

best regrads
Craxx ;-)
Craxx
PL Nut
 
Posts: 20
Joined: 7:11pm, Fri 26 Nov, 2010

Re: CKEditor and KCFinder bundle

Postby suhi » 8:39pm, Mon 03 Feb, 2014

The solution from Duncan is 100% ok. Have used it many times now and works every time. I suggest that you delete all the generated folders and let the system create new one. If still not OK, you can try to CHMOD it to 777 ...

Craxx wrote:Hy i have the same problem like suhi.
But when i test the last solution i get also the message the directory is not writable....

Please i need some HELP. I also tried a new clean installation, but the same behaviour.

best regrads
Craxx ;-)
suhi
phpLister
 
Posts: 14
Joined: 12:44am, Mon 31 Jan, 2011

Re: CKEditor and KCFinder bundle

Postby Craxx » 11:29am, Tue 04 Feb, 2014

NO it doesn´t work....

I was with my phplist on 1und1 Server and all worked like it should. Now i change my server to strato.de and i have these problems...

Perhaps another tip?

best regards
Craxx;-)
Craxx
PL Nut
 
Posts: 20
Joined: 7:11pm, Fri 26 Nov, 2010

Re: CKEditor and KCFinder bundle

Postby duncanc » 11:45am, Tue 04 Feb, 2014

You will have to explain more clearly what is happening, what your settings are (the plugin directory and the upload directory), and that you have followed the installation guidance at https://github.com/bramley/phplist-plugin-ckeditor
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: CKEditor and KCFinder bundle

Postby suhi » 8:44pm, Tue 04 Feb, 2014

Let us know where exactly is the upload folder created on the server and also what settings do you have for upload directory ..
Also advise what is your absolute root path on the server ...

regards,
Gregor
suhi
phpLister
 
Posts: 14
Joined: 12:44am, Mon 31 Jan, 2011

Re: CKEditor and KCFinder bundle

Postby reetp » 7:45pm, Tue 11 Feb, 2014

Having fun and games with this myself. Thanks heavens for eclipse and debugging....

Part I can solve, and I think this is relevant to others and to problems I had with v2.x which I solved. I've tried with the original installation from here:

https://github.com/bramley/phplist-plugin-ckeditor

And also updating to the latest versions of ckeditor and kcfinder

My server directory for this is :

/home/e-smith/files/ibays/testbay/html

The actual working directory for phplist is :

/home/e-smith/files/ibays/testbay/html/crm/phplist

The main folder for all images and attachments is :

/home/e-smith/files/ibays/testbay/html/crm/phplist/uploadimages

However $_SERVER['DOCUMENT_ROOT'] is set in php.ini to :

/home/e-smith/files/ibays/Primary/html

To override this I set the following in my phplist config.php and all is well with ckeditor :

$_SERVER['DOCUMENT_ROOT'] = "/home/e-smith/files/ibays/testbay/html";

Using DOC root is really bad IMHO - fine if you are the only web folder (a poor assumption), but can be fatal elsewhere.

Next I wanted to get KCFinder running but that was a disaster too.

First, KCFinder seems to be called in javascript, and it does it's own call to $_SERVER['DOCUMENT_ROOT']

So I edited kcfinder/config.php and added the same line again, and now we have KCFinder

However, that seems to ignore the Images folder set in PHPList and and creates the following :

/home/e-smith/files/ibays/testbay/html/crm/phplist/uploadimages/.thumbs
/home/e-smith/files/ibays/testbay/html/crm/phplist/uploadimages/files
/home/e-smith/files/ibays/testbay/html/crm/phplist/uploadimages/.htaccess

Odd creating .htaccess - how do they know whether it will work correctly or not ?

OK, I can live with that if I have to.

Images can be uploaded, and I can see them in KCFinder, but if I double click them to add them to CKEditor, I only get a partial url like this :

/crm/phplist/uploadimages/files/Login.png

If I edit and type the full URL the image will appear :

http://my.server.net/testbay/crm/phplist/uploadimages/files/image.png

It DOES know the path is a URL and not local ( it drops the /html/ )

I cannot trace why this happens as I believe it is due to an incorrect return in javascript here at the end of the file :

phplist/admin/plugins/CKEditorPlugin/kcfinder/core/uploader.php

This post shows the same problem :

http://sourceforge.net/apps/phpbb/kcfinder/viewtopic.php?f=8&t=73

I don't have enough skills to trace it all. This also refers :

http://docs.cksource.com/CKEditor_3.x/Developers_Guide/File_Browser_%28Uploader%29/Custom_File_Browser#Passing_the_URL_of_the_Selected_File

Any suggestions welcome - I'd love to see this fully working and it is frustrating to be so near and yet so far !
reetp
PL Nut
 
Posts: 20
Joined: 1:52pm, Wed 20 Oct, 2010

Re: CKEditor and KCFinder bundle

Postby reetp » 10:33am, Wed 12 Feb, 2014

As a follow up I forgot to mention that I had to amend the path in Configuration section :

plugins/CKEditorPlugin/ckeditor
plugins/CKEditorPlugin/kcfinder

I have been advised one way round the document root issue is to create a subdomain for you machine and direct that to the root of your install.
reetp
PL Nut
 
Posts: 20
Joined: 1:52pm, Wed 20 Oct, 2010

Re: CKEditor and KCFinder bundle

Postby Craxx » 4:36pm, Tue 18 Feb, 2014

THX for your answer, i am busy at the moment. I test and reply at weekend.

THX a lot and best regards
Craxx;-)
Craxx
PL Nut
 
Posts: 20
Joined: 7:11pm, Fri 26 Nov, 2010

Re: CKEditor and KCFinder bundle

Postby Craxx » 6:37pm, Fri 28 Feb, 2014

THX for your help but in the end the whole phplist is not full functional for me.
Sorry, but i buyed the superwebmailer for 99.-€ and now all is working fine.

THX a lot for help and best regards
Craxx ;-)
Craxx
PL Nut
 
Posts: 20
Joined: 7:11pm, Fri 26 Nov, 2010

PreviousNext

Return to Answers, HowTos, Tips and Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

cron