Hot answers tagged

9

The problem is that many developers don't know how to write compliant SQL statements - they're software developers who find themselves also filling the role of database developers. This problem crops up in many addons and was recently fixed in EE core code. For Assets v2.6 Change line 615 of ft.assets.php FROM: $sql = "SELECT DISTINCT a.source_type, a....


5

Assets does none of your four bullet points - these are all best done via CE Image as you're doing now (and it does all with aplomb). Why do you want to replace it? It's bar-none the best EE add-on for image manipulation (in the same way that Assets is the best file manager for EE). Re: S3 - Assets can store your files in an S3 bucket, but if you're going ...


5

EE simply removes any tags corresponding to custom fields that have no data. So by the time EE is ready to parse the outer {if} conditional, it will look like this: {if > 0} Try wrapping the field tag in quotes: {if '{tech_documents:total_rows search:doc_thumb="IS_EMPTY"}' > 0}


5

Okay, this definitely is an Assets issue, but here's a temporary fix. Open up ft.assets.php and look up the grid_replace_tag method, around line 1771. In there, you can see this line of code: $field_name = ee()->db->select('field_name')->from('channel_fields')->where(array('field_id' => $this->field_id))->get()->row('field_name'); ...


3

This is a pretty easy to resolve. Simply open up: /expressionengine/third_party/wygwam/mcp.wygwam.php and change line 139 from: $all_sources = ee()->assets_lib->get_all_sources(); to $all_sources = $this->EE->assets_lib->get_all_sources(); Looks like this is the only reference to the ee() global in the codebase. Because this code block ...


3

Ugh, wasn't logged in properly.... They sent me this on email support: If you could just replace line 814 in Assets_lib.php file with if (!(count($full_folder_list) == 1 && reset($full_folder_list) == ":any:")) you should be fine :)


3

Fixed: I found ini_set('memory_limit', '64M'); in /system/expressionengine/third_party/assets/sources/s3/source.s3.php and changed it to 1024M


3

This is due to a change in how EE validates Channel Form fields (not sure when this was implemented). When you upload a file via a file field, that field name isn't actually populated in the $_POST array, so EE doesn't know it's been submitted, and hence won't call the fieldtype which owns that field. It works around this issue for native File fields inside ...


3

Suggest you contact the hosting provider recommended by EllisLab: https://ellislab.com/community/hosting Also read this whitepaper supplied by them: https://www.nexcess.net/expressionengine/hosting-optimization You could Google "expressionengine hosting" and contact numerous of the hosting providers to see what they would recommend and supply, then either ...


2

We were seeing this same issue running Assets in our EE 2.5.2 environment. After we updated to Assets 2.2.2 it began working as expected.


2

It turns out that you must have at least one upload location (for that site, if MSM is enabled) present in order to set the upload location in Wygwam. For instance, I just performed a migration of Wygwam (2.7.1) data from using the native EE uploads to using Assets (2.2.2). Initially, I moved all of the images from the native upload location to an assets ...


2

See this post for info Matrix (2.5.8) update database error Sounds like it is the same or similar problem. I had this once and the info there was enough to go into the database and sort out the issue.


2

In Assets 2.2.2 you can't create folders that begin with an underscore. Until we release 2.2.3 it is possible to rename a folder to a name that begins with an underscore, but this is a bad idea, as you'll be unable to index these files. As for the reason why: 1) Since Assets now supports multiple source types, to eliminate the need for querying S3 and other ...


2

The quick way would be to use an SQL query (something like http://pastie.org/private/x6uue9y6ieqvlqf6ai59q), but that would not get you the URL, though, as that depends on several other settings. If you're confident that the settings for the upload folder (or Assets external source) for that will never change, this will probably not be an issue for you. The ...


2

When updating files connected to a CloudFront distribution you can speed up the required waiting period by invalidating the modified files. In many cases this reduces the waiting period to update CloudFront edge locations from days to under an hour. Details here: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html


2

As far as I know that's not possible. If you have a folder you need to use like that you'll have to just create a new root folder for it (if you don't want to use one of the existing ones)


2

If you're getting HTTP 403, rather than the cross-domain error that most people get, then you might be hitting the incompatible session bug. Assets uses Ajax to do a lot of things and that is processed via Frontend by EE, so if your Control Panel Session and User Session types are not compatible, the Ajax requests will think you're not logged in. You cna ...


2

I could be wrong, but I think Safecracker File automatically appends a number to the end of any duplicate filenames to avoid collisions. Have you verified that your perceived issue is actually an issue?


2

Yes, it is that easy, I've done this many times. In some earlier versions of Assets I had some issues doing this on a couple of sites, but later versions smoothed out the bumps. As always, do this on a dev copy of the site first - or at the veery least, take a full DB backup first.


2

You're after the exp:assets:files template tag: {exp:assets:files folder="{filedir_1}public"} <li>File name: {filename}</li> {/exp:assets:files} Change {filedir_1} to whatever is appropriate for your Assets field. To find what your filedir id is, go to Content → Files → File Upload Preferences and hover your mouse cursor ...


2

Assets is the most advanced file manager for EE, so if it doesn't do it then there isn't an out of the box solution for EE.


2

You need to use pair tag for this: {gallery_items var_prefix="file"} {exp:ce_img:pair src="{file:url}" max_width="1080" itemprop="image"} <img data-original="{made_url}" class="lazyload" alt="{file:alt_text}" width="{width}" height="{height}" /> {/exp:ce_img:pair} {/gallery_items}


2

Andris was close to the solution: Add the following code right above the switch statement. `if (($context == 'grid' || $context == 'matrix') && !empty($this->var_id)) { $context = 'low'; }` Then in the 'low' case (around like 163) change the query to: `$sql .= " ae.var_id = {$this->var_id} AND ae.row_id = '{$this->row_id}'";` Now ...


2

Just make sure your site url and all of your url paths in your admin > general configuration are https:// and also go to your content > file > file upload preferences and make sure that the url path there is https://. Also if you are hard coding the urls in your html head when attaching assets like css and js make sure those are https:// as well.


2

It's also worth noting that using protocol relative ( //domain.com ) will work in most situations. This allows you to not have to hardcode a protocol specific url. Helpful when you're using the same code on a live HTTPS site as well as a local, HTTP site.


2

Paul, that's available only to superadmins at the moment (Assets 2.2.4), due to security concerns of exposing 3rd party API keys. You can re-index the current folder in Assets by clicking the circular arrow on the top right corner, however that won't index any new folders. I'll add a config setting to the next version of Assets for this. Meanwhile, if you ...


2

We just came across a very similar issue where an Assets tag pair was not being parsed in one environment but was working fine in others while single tags were working fine everywhere. The solution for us turned out to be that we had to bump up the pcre.backtrack_limit value in the php.ini to 1000000 on the server where the tags weren't being parsed. It ...


2

Ok, for some reason, the Assets index was outdated for that folder, showing a weird mixture of old and current folders and files. I'm still not sure I'm ok with the ease at which both EE and Assets' indexes get out of sync without warning, but a re-indexing resolved the issue. Sorry for the false alarm.


2

Open up ft.assets.php file (located at third_party/assets/ft.assets.php), find the method "replace_element_tag" and add this as the first line in that method: $this->EE->load->add_package_path(PATH_THIRD.'assets/'); Sometimes EE would lose that package path and I'm not entirely sure why.


2

I'm using SuperSearch and getting the same issue, it appears that 'entry_id' is no longer being set in the settings array. I've fixed/patched for now by simply replacing line 2214 in the third_party_search_index() function which was $entry_id = $this->settings['entry_id']; To become: $entry_id = ee()->api_channel_entries->entry_id;


Only top voted, non community-wiki answers of a minimum length are eligible