FCKEditor upload problem in adva_cms 0.2.4

18 views
Skip to first unread message

Mark Nyon

unread,
Apr 18, 2012, 12:47:44 PM4/18/12
to adva...@googlegroups.com
Hi,

I've taken over an existing site running adva_cms 0.2.4. I'm running into a bug with uploading files through the FCKEditor. Here's the error I'm receiving:

Processing StaticController#dispatch (for 127.0.0.1 at 2012-04-18 12:22:44) [POST]
  Parameters: {"NewFile"=>#<File:/var/folders/4k/qh2vcsnd77n8skp7kppk5_yh0000gn/T/RackMultipart20120418-84192-a92x1p-0>, "path"=>["javascripts", "adva_fckeditor", "fckeditor", "editor", "filemanager", "connectors", "php", "upload.php"]}

ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
  haml (2.2.24) lib/sass/plugin/rails.rb:20:in `process_without_compass'
  compass (0.8.17) lib/compass/app_integration/rails/action_controller.rb:7:in `process'
  thin (1.3.1) lib/thin/connection.rb:80:in `pre_process'
  thin (1.3.1) lib/thin/connection.rb:78:in `catch'
  thin (1.3.1) lib/thin/connection.rb:78:in `pre_process'
  thin (1.3.1) lib/thin/connection.rb:53:in `process'
  thin (1.3.1) lib/thin/connection.rb:38:in `receive_data'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
  thin (1.3.1) lib/thin/backends/base.rb:61:in `start'
  thin (1.3.1) lib/thin/server.rb:159:in `start'

Rendered rescues/_trace (180.8ms)
Rendered rescues/_request_and_response (2.9ms)
Rendering rescues/layout (unprocessable_entity)

In order to reproduce this, I:
1. Go to a page on the website using adva-cms as an administrator
2. Edit the page by clicking on the "Edit" icon
3. Selecting a link in the edit page of the admin section
4. Click on the "Upload" tab in the dialog box that pops up
5. Click the "Choose Upload" button and select a file
6. Click on "Send it to the server"

The progress bar shows up and that error above appears in the log files.

I'm running Rails 2.3.4 (yes, an upgrade is underway) and Ruby 1.8.7. What could be the source of this error? Thanks,



Matthias Viehweger

unread,
Apr 26, 2012, 3:23:46 AM4/26/12
to adva...@googlegroups.com
Hi Mark!

On Wed, Apr 18, 2012 at 09:47:44AM -0700, Mark Nyon wrote:
> I've taken over an existing site running adva_cms 0.2.4. I'm running into a
> bug with uploading files through the FCKEditor. Here's the error I'm
> receiving:

I think we did some work to patch that in a client project. I will try
to reach the developer who did this.

Does uploading the file throught the Assets-Interface work? IIRC one way
of getting the images into articles was to upload them as assets and
then they should be available to the editor also.

> I'm running Rails 2.3.4 (yes, an upgrade is underway) and Ruby 1.8.7. What
> could be the source of this error? Thanks,

I was only sucessful in upgrading an adva_cms-site to Rails 2.3.5,
anything beyond that broke several things. adva_* patches the internals
of Rails heavily to get decent engine-support.

Cheers,
Matthias
--
Softwareentwickler

X&E Handelgesellschaft mbH
Neusser Str. 93
50670 Köln
signature.asc

Mark Nyon

unread,
May 4, 2012, 7:33:43 AM5/4/12
to adva...@googlegroups.com
Hi Mathias!

I've actually figured out a solution to the problem at hand. 

It turns out that the FCKEditor is relying on PHP in order to do the upload, so I needed to configure nginx to work with PHP-FPM in order to upload correctly.

That fixed that problem.

What problems did you run into moving beyond 2.3.5? I've only run into some problems with labels so far.

Thanks,
Mark

50670 K�ln

Matthias Viehweger

unread,
May 4, 2012, 11:44:18 AM5/4/12
to adva...@googlegroups.com
Hi Mark!

On Fri, May 04, 2012 at 04:33:43AM -0700, Mark Nyon wrote:
> It turns out that the FCKEditor is relying on PHP in order to do the
> upload, so I needed to configure nginx to work with PHP-FPM in order to
> upload correctly.

Cool. I think we spent quite some time to get it to work without PHP,
but it seems better to just use the officially supported way :)

> What problems did you run into moving beyond 2.3.5? I've only run into some
> problems with labels so far.

As far as I remember, the test-suite broke at a gazillion places. Keep
in mind that I had to test this against all known plugins/engines. If
your problems are rather minor, then I am really happy for you. I always
think back to that 1hour test-suite just of unit-tests.
I didn't work actively on this codebase for several years now, so maybe
I remember something wrong. For Rails3 we started fresh with adva-cms2, but
never got to the same completion level.

Anyway, I am happy that your problems are solved for now.

Cheers,
Matthias
--
http://kronn.de
@der_kronn
signature.asc
Reply all
Reply to author
Forward
0 new messages