0

It appears that when I enable throttling in EE (2.5.5), assets stops rendering thumbnails or other files. Shouldn't there be a way to get around this throttling issue with logged in members?

UPDATE:

htaccess file

RewriteEngine On RewriteCond $1 !.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L]

1
  • Hi, Nuno - I'm not able to reproduce this. Do you have any .htaccess in place? If so, can you add its contents to your original post? And what version of Assets are you on? Thanks!
    – Lisa
    Commented Mar 1, 2013 at 16:26

2 Answers 2

1

Thanks for adding your .htaccess, Nuno. Shouldn't be a problem there. Can you try adding:

$config['assets_site_url'] = '/index.php';

to your /system/expressionengine/config/config.php file? Please let me know if that clears up this issue for you.

Also, please make sure that you've "Updated Indexes" in Assets. Thank you!

2
  • Hi Lisa, I added the config override but I'm still getting the throttling error. I'm looking at the Firebug Net panel and notice that after loading a dozen images or so, Assets stops responding because the server throws a "You have exceeded the allowed page load frequency." message instead of the expected json result. I guess because Assets uses the ACT url, it is subject to the throttling rules. Commented Mar 6, 2013 at 14:51
  • Hi Lisa and Nuno, Have you found a solution for this problem? Running into exactly the same thing because ASSETS's using the ACT url. Since that url is subject to the throttling rules the images won't load as they should. I there a way to have ASSETS fetch the image data for display via a direct url to a png/jpg file? Those aren't subject to the throttling rules. Commented Jan 22, 2014 at 10:31
0

EE 2.10.1, Assets 2.5: I hope to find a better solution than modifying a core file... For now, one way I found was to edit system/libraries/Core.php. In function run_ee(), search "// Throttle and Blacklist Check". Remove (line 305):

if (REQ != 'CP')

Add:

if (REQ != 'CP' AND ee()->session->userdata('can_access_cp') != 'y')

Therefore, you have to load the session library before you can use the userdate method. To keep it simple, search for:

ee()->load->library('remember');
ee()->load->library('localize');
ee()->load->library('session');
ee()->load->library('user_agent');

Move these lines above "// Throttle and Blacklist Check". Of course, it would be better to do the blacklist check and the throttling before loading these classes...

1
  • Years later, can't believe it... EE 3.5.11, Assets 3.0.5--nothing changed. Workaround: same as for EE 2.10.1 and Assets 2.5, change function run_ee in system/ee/legacy/libraries/Core.php. Commented Oct 1, 2017 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.