1

I have installed the Assets plugin but it is not working at all. It is installed on a linux server with php 5.3.17, Expression Engine 2.6.1 and Assets 2.1.4. I have set the correct upload directories in the basic file manager which is supplied with EE itself. When I want to update the indexes of the Assets plugin, nothing happens. It does, however, uses the following http headers:

A POST from jquery to index.php with the callstack:

  • jquery.js:177
  • jquery.js:171
  • jquery.js:162
  • settins.min.js:1
  • jquery:86
  • jquery.js:78

The response tot that is a HTTP 302 to the location admin.php. Next a GET from /index.php with, again, a HTTP 302 response to admin.php?S=0&D=cpC=homepage. After that, a GET request is made to the forementioned page and a HTTP 200 is returned.

The same requests are made when trying to upload a new file from the Assets plugin. Also, the Upload Files button is disabled. After removing the disabled tag and trying to upload a new file, the three forementioned requests are made with the same response and a javascript alert with the message "Could not upload the file - server returned an unexpected response. Please check the server settings.".

I have reinstalled the module, checked all the required file chmod attributes and session/cookie settings. but to result.

1 Answer 1

3

Generally when this happens it’s because either your system is off, or your .htaccess file intercepting Assets’ Ajax requests.

If it’s the latter, you can try adding this to system/expressionengine/config/config.php:

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

Assuming you don’t have a .htaccess redirect that forces “index.php” out of the URL, that should help Assets’ Ajax requests bypass your main index.php redirect.

If you do have a redirect that forces index.php out of the URL, then try modifying your main index.php redirect to include this line before the RewriteRule line:

RewriteCond %{QUERY_STRING} !^ACT= [NC]

And also change your RewriteRule line to this:

RewriteRule ^(.+)$ /index.php/$1 [L]

(Notice the ‘.+’ rather than ‘.*’.)

2
  • It is a brand new installation so I'm guessing it is the .htaccess file. The file does however forced index.php out of the url: <IfModule mod_rewrite.c> RewriteEngine On # Removes index.php from ExpressionEngine URLs RewriteCond $1 !\.(gif|jpe?g|png)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>
    – Nick
    Jul 19, 2013 at 12:56
  • In that case, updated my response with more info for you. Jul 19, 2013 at 18:05

Your Answer

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

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