Assets - webserver/php timeouts

Hi

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?

Cheers...

Comments

  • edited 10:16PM
    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 10:16PM
    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 10:16PM
    OK. Look forward to hearing what you find out.
  • edited 10:16PM
    Well, now the easy one of the jobs is done.

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

    https://github.com/croaker000/ckf_assets

    The problem of selecting an asset from a page's rich text editor still exists. I'll work on that next...
  • edited 10:16PM
    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?

    TIA
  • edited 10:16PM
    You could try using a route.
  • edited 10:16PM
    oooh. Good idea. Should have thought of that myself...
  • edited 10:16PM
    My repo at https://github.com/croaker000/ckf_assets now supports a CKFinder image picker.
  • edited 10:16PM
    Nice! Thanks for sharing.
  • edited 10:16PM
    @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 10:16PM
    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 10:16PM
    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.