README.txt is unclear on how to set up file browser

freixas - June 18, 2009 - 17:06
Project:FCKeditor - WYSIWYG HTML editor
Version:6.x-1.3
Component:Documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

When using the built-in file manager, we are given these instructions:

In this file(s) you will need to enable the file browser by adding one
line that includes file with the special authentication function for
Drupal (filemanager.config.php). Add this code:

require_once "../../../../../filemanager.config.php";
(FCKeditor 2.5+)

straight below this line:

$Config['UserFilesAbsolutePath'] = '' ;

The exact position of these two lines is significant. They should be added, I believe, right after

<?php
global $Config ;

// SECURITY: You must explicitly enable this "connector". (Set it to "true").
// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only
//        authenticated users can access this file or use some kind of session checking.
$Config['Enabled'] = false;

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '' ;

// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Useful if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
?>

Adding the lines at the top of config.php will cause them to be ineffective since their changes are wiped out. Adding them at the bottom of config.php also makes them ineffective because their changes are not used in creating some of the other configuration values.

#1

Gary Feldman - June 26, 2009 - 00:31

I agree with the point being made, and have a couple of other clarifications to suggest. When giving step-by-step instructions, the prose should always come in the same order that the reader needs to act on it. Instead of saying "Add this .... after this ....", it should say "Find this line: .... Once you've found it, insert the following immediately after it: ...." (Perhaps the phrase "straight below" is a British idiom, because the only thing it suggests to me is not to indent it. Or maybe it just got copied from Python instructions.)

A second suggestion for the same part of the readme is to be very clear that this isn't really tied to using the FCKeditor file browser. If I've figured things out correctly, I have to do this even if I'm using IMCE instead. In the paragraph with the header "Uploading images and files", I suggest adding a line reading "Regardless of which of these three methods you use, you must configure the FCKeditor file browser for uploading to work." And then change the next header line to something like "How to enable uploading or the FCKeditor file browser".

#2

battlingnewbie - July 23, 2009 - 08:58

I changed the setting in config.php for the file broiwser but now the button to browse the server is missing. I cannot browse the server to upload any files. Please help me to setup the browser so I can upload files to the page and create links for them.

I got the button back so scrap the top part but now I get the following error:

Error creating folder "redirect:/index.php/file/" (Can't create redirect: directory)

#3

Jorrit - July 23, 2009 - 09:14

Have you changed your profile?

#4

battlingnewbie - July 23, 2009 - 10:09

I have changed the profile and I have edited the config.php file and now I get the following error and the setting is:

$Config['Enabled'] = true ;

I get:

This connector is disabled. Please check the "editor/filemanager/connectors/php/config.php" file

I have done all that is said above and I have added the line they said I should do but I cannot get the editor to work so please explain to me why is so difficult to get a thing like this to work? Please help me I am new to this.

What does it mean the connector is disabled if it is not? Why disable it in the first place?

If you add this line
require_once "../../../../../filemanager.config.php"; then the editor gives an error of the connector not being enabled while it is and if you take the line away then it says it cannot create a folder. So what is the correct way or is there another file not mentioned here that you also have to edit?

#5

javier_david - July 23, 2009 - 23:33

Yes, it suck when things doesn't work out-of-the-box but anyway here is how I solved:

In the file "editor/filemanager/connectors/php/config.php" add the line:

require_once "../../../../../filemanager.config.php";
(FCKeditor 2.5+)

straight below this line:

$Config['UserFilesAbsolutePath'] = '' ;

Then in the "sites/default/settings.php", uncomment the variable $cookie_domain and specify with your domain.

That's all.

#6

Fergal - July 24, 2009 - 08:31

From the instructions I initially thought that two lines were to be added,
but I may have read it incorrectly.

Am I right in saying, only the one line needs to be added:

require_once "../../../../../filemanager.config.php";

And this line is added staright below this line:
$Config['UserFilesAbsolutePath'] = '' ;

As opposed to adding the first line, and adding the second line straigth below it.

#7

Jorrit - July 24, 2009 - 09:13

I don't know how you could read that $Config['UserFilesAbsolutePath'] = '' ; should be added. It is already in that file. Besides that, the readme does not say anywhere that you should set $Config['Enabled'] = true ;.

If someone could suggest a better text, please do so.

#8

Fergal - July 24, 2009 - 12:48

Yeah - sorry about that - I read it wrong, my fault I know
Although it looks like I wasn't the only one.

#9

Jorrit - August 2, 2009 - 20:40
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.