Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FCKEditor image upload problems


Dan_Evans

Recommended Posts

Hi,

 

I have installed the Extra pages-info box w/ admin (http://www.oscommerce.com/community/contributions,2021/) and FCKEditor for Product Descriptions (http://www.oscommerce.com/community/contributions,2900/) contributions.

 

Most of the features seem to work okay, and I'm very impressed with FCKEditor (especially compared to HTMLArea, which in my experience is pretty awful and outputs messy, non-standards-compliant HTML).

 

However, the image upload feature does not seem to work. I don't get any error messages, but when I click the insert image button and select 'browse server' to select an image, the file browser does not display any files. The directory at the top is always listed as '/', and clicking there does nothing (there is a rollover effect there however which suggests to me that it should be doing something).

 

If I try to upload an image, it appears to be connecting to the server (I get a message in my browser's status bar etc.) but then nothing happens. I have checked using FTP and the file I uploaded is nowhere to be seen.

 

If I try to create a new folder in the file browser, again nothing happens.

 

I thought that maybe the problem was that I am using FCKEditor 2.3, whereas the contribution mentions v2.2, but from googling and looking in the FCK forums it seems like this is a common problem that people have experienced since version 2.0! And I can't find any solutions to the problem.

 

There are some config files within the FCKEditor directory that apparently need to be set up for the image upload functionality to work (which are NOT mentioned in the documentation for the contribution. The contribution also does not seem to have its own support thread here.)

 

I have set these FCK config files according to the documentation and it all seems to be correct. I've tried all the tweaks to these config files I can think of but still nothing.

 

So has anyone actually got this to work with osCommerce?

 

Dan

Link to comment
Share on other sites

Problems with FCKEditor are probably more related to how PHP, your hosting account, and the OS are set up. My experience with these editors is that you tend to find better information by going to the source: find a support forum for FCKEditor and describe the problem there.

 

I thought that might be the case... I did also post on an FCKEditor support forum, hopefully I will have some luck there.

 

Thanks anyway.

Link to comment
Share on other sites

Hi,

 

I have installed the Extra pages-info box w/ admin (http://www.oscommerce.com/community/contributions,2021/) and FCKEditor for Product Descriptions (http://www.oscommerce.com/community/contributions,2900/) contributions.

 

Most of the features seem to work okay, and I'm very impressed with FCKEditor (especially compared to HTMLArea, which in my experience is pretty awful and outputs messy, non-standards-compliant HTML).

 

However, the image upload feature does not seem to work. I don't get any error messages, but when I click the insert image button and select 'browse server' to select an image, the file browser does not display any files. The directory at the top is always listed as '/', and clicking there does nothing (there is a rollover effect there however which suggests to me that it should be doing something).

 

If I try to upload an image, it appears to be connecting to the server (I get a message in my browser's status bar etc.) but then nothing happens. I have checked using FTP and the file I uploaded is nowhere to be seen.

 

If I try to create a new folder in the file browser, again nothing happens.

 

I thought that maybe the problem was that I am using FCKEditor 2.3, whereas the contribution mentions v2.2, but from googling and looking in the FCK forums it seems like this is a common problem that people have experienced since version 2.0! And I can't find any solutions to the problem.

 

There are some config files within the FCKEditor directory that apparently need to be set up for the image upload functionality to work (which are NOT mentioned in the documentation for the contribution. The contribution also does not seem to have its own support thread here.)

 

I have set these FCK config files according to the documentation and it all seems to be correct. I've tried all the tweaks to these config files I can think of but still nothing.

 

So has anyone actually got this to work with osCommerce?

 

Dan

 

Dan,

 

Actually this is not osCommerce problem rather it's FCK configuration requirement. Try to create a directory called "UserFiles" on your web root, and create the following directories below it each for its type of files:

 

Image

Flash

Media

 

I hope it would work for you. Good Luck.

Link to comment
Share on other sites

Dan,

 

Actually this is not osCommerce problem rather it's FCK configuration requirement. Try to create a directory called "UserFiles" on your web root, and create the following directories below it each for its type of files:

 

Image

Flash

Media

 

I hope it would work for you. Good Luck.

 

Hmm, still no luck, but thanks for the suggestions.

 

I have still not had a reply at the FCKEditor forums...

 

Problems with FCKEditor are probably more related to how PHP, your hosting account, and the OS are set up.

 

I know this probably isn't the best place to ask, but can you give me any more clues as to what aspects of the hosting setup might cause something like this? Should I be looking in php.ini? Something to do with Apache (httpd.conf)? Is it likely to be something that I can change myself, or will I need to get the hosting company to make some changes at their end? Is there even any hope of getting this working?

 

If you could point me in the right direction that'd be very helpful...

 

Thanks,

Dan

Link to comment
Share on other sites

I know this probably isn't the best place to ask, but can you give me any more clues as to what aspects of the hosting setup might cause something like this? Should I be looking in php.ini? Something to do with Apache (httpd.conf)? Is it likely to be something that I can change myself, or will I need to get the hosting company to make some changes at their end? Is there even any hope of getting this working?

 

What I meant by that is you sometimes have your site set up in such a way that these editors have a hard time with the paths and permissions. There's not really anything you can do unless you know what the problem is first, and that requires either doing some digging, or getting an answer from the FCK people.

 

FCKEditor has been used with Mambo/Joomla. I think if you look through those forums, you will probably find some people with this problem. It might get you a little farther.

Contributions

 

Discount Coupon Codes

Donations

Link to comment
Share on other sites

  • 2 weeks later...

I've got the Upload working with Ver 2.3.1

Change in fckconfig.js Line 134 & 135

var _FileBrowserLanguage	= 'php';	// asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage	= 'php';	// asp | aspx | cfm | lasso | php

\editor\filemanager\browser\default\connectors\php\config.php

Line 24, 27

$Config['Enabled'] = true;
$Config['UserFilesPath'] = '/uploads/';

Also check line 33 ... I had to set this on a IIS server

\editor\filemanager\upload\php\config.php

Line 24, 27

$Config['Enabled'] = true;
$Config['UserFilesPath'] = '/uploads/';

& again perhaps line 33

 

All seems to work OK

Link to comment
Share on other sites

Thanks JayPee,

 

I almost have it working. I can upload an image but the image is not displaying, getting the x in box. Also cannot see the images uploaded when browsing the server from the image properties box.

 

Any ideas.

 

Thanks

Edited by spiderweb
Link to comment
Share on other sites

I cannot make a sub-directory as I get a message saying You have no permissions to make a folder.

 

Also when I upload an image I am getting a successful upload message but there is no image in the folder.

 

I have the uploads folder inside the images directory and both have permissions set to 777, is this correct?

 

Thanks

Link to comment
Share on other sites

Hi JayPee,

 

Still not working. When I upload the images, I get a successful upload mesage but I cannot see the images anywhere including via ftp.

 

This is the code I have changed;

 

fckconfig.js

var _FileBrowserLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py

var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | php

 

\editor\filemanager\browser\default\connectors\php\config.php (Line 24, 27)

$Config['Enabled'] = true ;

$Config['UserFilesPath'] = '/uploads/' ;

 

Line 33

$Config['UserFilesAbsolutePath'] = 'http://www.mydomain.com/images/uploads/' ;

 

\editor\filemanager\upload\php\config.php (Line 24, 27)

$Config['Enabled'] = true ;

$Config['UserFilesPath'] = '/uploads/' ;

 

Line 33

$Config['UserFilesAbsolutePath'] = 'http://www.mydomain.com/images/uploads/' ;

 

 

I have create the uploads folder inside the images folder of the root directory and set permissions to both these folders to 777

 

I have got this right.

 

Thanks for your assistance.

Link to comment
Share on other sites

Still not working.

 

This what I now have as my absolute path /home/xxxxxx/public_html/images/

 

Is this correct?

 

Also getting an error message "XML request error: unknown (12152)" when going to the images properties then link and selecting Browse Server.

 

Thanks again for your assistance.

Link to comment
Share on other sites

Now have images uploading, can see them by my ftp but not in FCKeditor.

 

Does the domain need to be delegated (as it is not) but I have been able to preview and setup the admin of oscommerce and everything else including modules?

 

Thanks again.

Link to comment
Share on other sites

Delegation should not matter (AFAIK)

Just a thought ...

I have found that using the 'Upload' from the 'Link' Tab of Image Properties seems to work where the 'Upload' Tab may not - Also, when you browse the server, it defaults to browsing 'File' resources, not 'Image' which is what you require.

Link to comment
Share on other sites

When I click on Link - Browse Server and then upload a file from there the image goes to the "File" folder and if I click on the image it does not insert into the preview or show a URL (found the demo on the FCKEditor site the same).

 

But when I click on Browse Server from the Image Info and then upload a file it goes into the "Image" folder which I can then click on and tries to insert into the preview except I get a box with an X in it. On the FCKeditor site it actually inserts the image.

 

Totally baffled now!

Link to comment
Share on other sites

When I click on Browse Server from the Image Info and then upload a file it goes into the "Image" folder which I can then click on and tries to insert into the preview except I get a box with an X in it. On the FCKeditor site it actually inserts the image.

 

The code shown by the FCKeditor source function shows the following;

 

<a href="/images/uploads/File/cut.jpg"></a><img alt="" src="/uploads/Image/cut.jpg" />

 

The same function in the demo on the FCKEditor site shows the following;

 

<img height="150" width="200" alt="" src="/_userfiles/Image/cut.jpg" /><a href="/_userfiles/File/cut.jpg"></a>

 

Cheers

Link to comment
Share on other sites

From the FCKEditor wiki

 

To upload files to the server you will also need to:

 

1) chmod 0777 the directory you want to upload to (insecure).

 

* Note: It is advisable to change the group ownership of the directory to the same user as apache and add group write permisions instead

 

2a) in .../connectors/php/config.php You have to set $Config['Enabled'] to TRUE

 

2b) as well as comment the line starting with $Config['UserFilesPath'] = '...';

 

3) If you want to use absolute paths in the javascript snippet above you have to change .../connectors/php/connector.php

 

and replace: $GLOBALS['UserFilesDirectory'] = GetRootPath() . $GLOBALS['UserFilesPath'] ;

 

with:

 

$GLOBALS['UserFilesDirectory'] = $GLOBALS['UserFilesPath'] ;

 

4) You may also need to comment the lines in the fckconfig.js file that relate to 'ImageBrowserURL' and 'LinkBrowserURL'

 

I'm guessing that point 3 in particular is worth noting

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...