PDA

View Full Version : FCKeditor editor problem



cacooke
08-11-2005, 02:55 PM
I'm having 2 issues with a fresh install of oscMax 2.0 and the WYSIWYG editor.

#1:

Although saving the description of a category works (partially), whenever I bring up that category to edit it, the original content doesn't display or just doesn't exist. I'm assuming that it is not being pulled from the DB correctly, since it does display on the actual site. This is becoming very frustrating because if there needs to be just a small typo change, I have to re-do the whole thing.

#2:

Image uploads and insert doesn't work. All I get for a Path on upload is a forward slash. It also hangs and just shows UPLOAD in progress and hangs. If I hit F5 to refresh, it refreshes with no update...

it also show errors processing the page, OBJECT EXPECTED... I think it is a path problem, because NO program can write to my root "/" directory, period, and I think that is what it is trying to do - with an invalid path.

I'm running out of time...
PLEASE HELP!

rjavery
08-23-2005, 02:11 PM
For the category descriptions see bugtracker http://bugtrack.oscmax.com/view.php?id=20 the fix worked for me.

Not sure about the images - don't you have to allow write to some directories such as catalog/images and catalog/admin/images. chmod 777 on these directories should do the trick.

newzen
09-01-2005, 12:40 PM
i have the same problem to upload images from my computer, i select the images and say uploadling images but nerver go up.

emma
09-06-2005, 06:48 AM
We are having the same problem - please post solution if you have it. Thanks

michael_s
09-06-2005, 08:28 AM
http://oscdox.com/PNphpBB2-viewtopic-t-5190.html

Always read the stickies...

Sander
09-12-2005, 01:37 AM
i still have problems, cant upload anything, or make folders.

have read and applied every sticky and bugfix.

michael_s
09-14-2005, 10:10 AM
There is a problem with FCKeditor and how it handles path info. I am not sure when they will fix it over at FCKeditor, but I have found a quick and dirty workaround for the issue.

In /FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php you need to hardcode the path you want to use. Change the following lines to something like this:

Line 24-25:


// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '/' ;

Line 39:


$GLOBALS["UserFilesDirectory"] = '/full/server/path/to/your/catalog/images' . $GLOBALS["UserFilesPath"] ;

Make sure your /catalog/images/ directory is writable by your webserver and you should be good to go...

Not the best solution, but it works. :)

Sander
09-15-2005, 12:03 AM
Works!

dcc
10-30-2005, 11:09 AM
I have installed OCsmax 2RC2 and I just can not get the FCKeditor to work to show my image folder or to upload. I have tried the stickies as suggested and any other suggestions that have been posted. I still get an error on page message. The details of the error are as follows:
Line: 115
Char: 2
Error: Object required
Code: 0 url: .../catalog/FCKeditor/filemanager/browser/default/frmresourselist.html

Now if you go to the frmresourselist.html line 113 to 116 reads as follows:

line113 = // Get the current folder path.
line114 = var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
line115 =var sCurrentFolderPath = oNode.attributes.getNamedItem('path').value ;
line116 = var sCurrentFolderUrl = oNode.attributes.getNamedItem('url').value ;

Now this is the same error i get with all the suggestions

Any more suggestions?

miahac
12-12-2005, 08:39 AM
I have tried both fixes mentioned here but when I use the FCKeditor I can upload and browse directories but when accept the image, the path does not include the whole url.

It only shows the /UserFiles/Image/someimage.jpg instead of the entire URL.

Any clues? I have updated from rc1 to rc2.

Bassmaster
11-21-2006, 01:36 PM
I have tried every fix I could find on the fourms but can not get FCKeditor to work properly. Most importantly is "insert image"

1. When you attempt to insert image, it looks like something happens, but nothing does.

2. Create directory " You do not have permission to create.

I have changed the code in connector.php and all image directories have writable permissions. Does anyone have another suggestion.

Below is my connector.php file with the path slightly edited. Does anyone see something I missed.

Thanks in advance.


-------------------------------------------------------------------------------

<?php
/*
* FCKeditor - The text editor for internet
* Copyright 2006 osCMax2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* File Name: connector.php
* This is the File Manager Connector for PHP.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
*/

include('config.php') ;
include('util.php') ;
include('io.php') ;
include('basexml.php') ;
include('commands.php') ;

// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '/' ;

if ( isset( $Config['UserFilesPath'] ) )
$GLOBALS["UserFilesPath"] = $Config['UserFilesPath'] ;
else if ( isset( $_GET['ServerPath'] ) )
$GLOBALS["UserFilesPath"] = $_GET['ServerPath'] ;
else
$GLOBALS["UserFilesPath"] = '/UserFiles/' ;

if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) )
$GLOBALS["UserFilesPath"] .= '/' ;

// Map the "UserFiles" path to a local directory.
//$GLOBALS["UserFilesDirectory"] = GetRootPath() . str_replace( '/', '\\', $GLOBALS["UserFilesPath"] ) ;
$GLOBALS["UserFilesDirectory"] = '/home/httpd/vhosts/MYSITE.com/httpdocs/images' . $GLOBALS["UserFilesPath"] ;

DoResponse() ;

function DoResponse()
{
if ( !isset( $_GET['Command'] ) || !isset( $_GET['Type'] ) || !isset( $_GET['CurrentFolder'] ) )
return ;

// Get the main request informaiton.
$sCommand = $_GET['Command'] ;
$sResourceType = $_GET['Type'] ;
$sCurrentFolder = $_GET['CurrentFolder'] ;

// Check if it is an allowed type.
if ( !in_array( $sResourceType, array('File','Image','Flash','Media') ) )
return ;

// Check the current folder syntax (must begin and start with a slash).
if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ;
if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ;

// File Upload doesn't have to Return XML, so it must be intercepted before anything.
if ( $sCommand == 'FileUpload' )
{
FileUpload( $sResourceType, $sCurrentFolder ) ;
return ;
}

// Prevent the browser from caching the result.
// Date in the past
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
// always modified
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
// HTTP/1.1
header('Cache-Control: no-store, no-cache, must-revalidate') ;
header('Cache-Control: post-check=0, pre-check=0', false) ;
// HTTP/1.0
header('Pragma: no-cache') ;

// Set the response format.
header( 'Content-Type:text/xml; charset=utf-8' ) ;

CreateXmlHeader( $sCommand, $sResourceType, $sCurrentFolder ) ;

// Execute the required command.
switch ( $sCommand )
{
case 'GetFolders' :
GetFolders( $sResourceType, $sCurrentFolder ) ;
break ;
case 'GetFoldersAndFiles' :
GetFoldersAndFiles( $sResourceType, $sCurrentFolder ) ;
break ;
case 'CreateFolder' :
CreateFolder( $sResourceType, $sCurrentFolder ) ;
break ;
}

CreateXmlFooter() ;

exit ;
}
?>

capmex
06-20-2007, 01:49 PM
Same problem here for uploading and browsing images. I tried many fixes, but the 'browse server' button on the images dialog always opens in the root folder. Every time a change was made I cleared the cache to test.

Do someone knows of another file besides connector.php that I need to look in?

I'm also thinking if it's possible to update the fckeditor version.

jpf
07-05-2007, 09:00 PM
There is no problem updating fckeditor if you want. It should not be hard. Your problems seam to be permissions.

mc8
09-22-2007, 07:56 AM
There is a problem with FCKeditor and how it handles path info. I am not sure when they will fix it over at FCKeditor, but I have found a quick and dirty workaround for the issue.

In /FCKeditor/editor/filemanager/browser/default/connectors/php/connector.php you need to hardcode the path you want to use. Change the following lines to something like this:

Line 24-25:


// Get the "UserFiles" path.
$GLOBALS["UserFilesPath"] = '/' ;Line 39:


$GLOBALS["UserFilesDirectory"] = '/full/server/path/to/your/catalog/images' . $GLOBALS["UserFilesPath"] ;Make sure your /catalog/images/ directory is writable by your webserver and you should be good to go...

Not the best solution, but it works. :)

Hi -
This works great for browsing and selecting files, but once I click on a file name, the URL reads /UserFiles/image/whatever.jpg and the image appears broken. If I then put "/images" at the beginning to make the URL read images/UserFiles/image/whatever.jpg it works fine and shows the image. I cannot figure out where to change code to have that show up properly in the URL box once an image is selected. Any help???

seaserver
11-18-2007, 10:06 AM
I am unable to view the server when trying to add images using the FCKeditor. Permissions for the images directories in /catalog/images and /catalog/admin/images/ have been set to 777.

The first post to the stickies fix for this problem is no longer active so I updated the path in connectors.php. I updated the two lines as follows:
$GLOBALS["UserFilesPath"] = '/' ;

$GLOBALS["UserFilesDirectory"] = '/home/httpd/vhosts/mydomainname.com/httpsdocs/images' . $GLOBALS["UserFilesPath"] ;

Now, I receive the following error when I click on Browse Server.

XML request error: Unknown (12152)

Any ideas? I have osCMax version v2.0 RC3 installed with register globals OFF.

seaserver
11-18-2007, 10:17 AM
Scratch the previous post. I had a typo in the domain name that was causing the XML error.

However, after the / was added and the full path specified in the connector.php as described above, I still see a blank image window and am unable to upload images when the Browse Server button is clicked.