Assets - webserver/php timeouts


I've having trouble both managing my asset images in Admin and select assets for inclusion in the RTE.

I've got about 4000 images PDFs.

If I click on Assets in Admin, I eventually get a "The connection has timed out" browser error. If I click the Image toolbar icon on the rich text editor, I either get the same error or an Error 500 (website logs show a timeout for these).

I get the same problem on the live 1and1 hosted site and on my local (very powerful) testbed.

I realise that extending the php.ini timeout might fix this locally, it's not an option for the live site.

I'm guessing the PHP is trawling the assets to build a list to present.

Any suggestions on resolving this? Is there a way to cache this data to speed up the lookups?



  • edited 6:21PM
    Unfortunately there currently isn't a way to cache the data. If your assets can be broken into sub folders, I would try doing that and then in your models or layouts, specify the "folder" parameter in your form_fields method so you only target that particular sub folder.
  • edited 6:21PM
    Thanks. Your suggestion is certainly viable for designing a new site. Unfortunately, the site in question is a migration from a static HTML based one and no previous thought had been put into organising the assets sensibly.

    I have other potential site conversions where even a valid set of assets will probably cause similar problems so I don't think this issue will go away.

    I'll see if I can come up with some ideas and report back... eg. for Admin->Site->Assets, we could employ cke's cousin, ckfinder...
  • edited 6:21PM
    OK. Look forward to hearing what you find out.
  • edited 6:21PM
    Well, now the easy one of the jobs is done.

    This plugin swaps out the native Site->Assets manager and uses CKFinder instead.

    The problem of selecting an asset from a page's rich text editor still exists. I'll work on that next...
  • edited 6:21PM
    I think I need a little help here to get started on over-riding the select dialog. It looks like I need to make changes to ./fuel/modules/fuel/controllers/assets.php

    Is it possible to tell fuel to ignore that file and use mine instead via a configuration or do I need to physically overwrite that file to change the select function?

  • edited 6:21PM
    You could try using a route.
  • edited 6:21PM
    oooh. Good idea. Should have thought of that myself...
  • edited 6:21PM
    My repo at now supports a CKFinder image picker.
  • edited 6:21PM
    Nice! Thanks for sharing.
  • edited 6:21PM
    @almostcompletely can you help me with how to open a specific directory when the ck asset manager opens.

    I have tinkered with the ckfassets.js - ckf_browseserver(path) to do something. I even tried changing the core ckfinder_php5.php file. Still no luck.

    I am filling sub_folder attribute in the asset type input. I would like to open that subfolder in the assets/images folder when the ckfinder window opens.
  • edited 6:21PM
    OK found it myself. I was looking at the wrong documentation.
  • Cool. How did you did you do it in the end? There's various ways. I usually use a cookie if I need a specific directory for a specific field.
  • edited 6:21PM
    I passed the sub-folder parameter from the asset field to the javascript function, which is called on the SELECT click event. From there i simply set the startupPath to the subfolder value.
Sign In or Register to comment.