Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Ignored fieldtype Asset, in ignored Channel, only returns 100 for non-default language

Status Resolved
Add-on / Version Publisher 1.2.2
Severity Critical
EE Version 2.7.3

JohnDWells

Mar 25, 2014

Hi Brian,

(I’ve tested the below with Assets 2.2.2 and 2.2.4)

I have 2 languages set, English and Portuguese, with English as the default.

I have set all Asset fieldtypes to be “ignored” by Publisher, and I have one channel which is also set to be ignored.  The channel has one field, an Assets field, and it allows more than one asset selection.

In my template I loop through the channel’s entries, and then loop through each entry’s assets.

When I view the front end in the default language, all of the selected files are shown; however when I view the front end in an alternate language, the total number of asset files only goes to 100.

For example when viewing English, I have 5 channel entries and they have the following number of assets:

entry 1: 18
entry 2: 24
entry 3: 19
entry 4: 24
entry 5: 35
(total = 120)

Then when I view the same template in Portuguese, the result is as follows:

entry 1: 18
entry 2: 21
entry 3: 19
entry 4: 21
entry 5: 21
(total = 100)

Hope that helps.

Cheers,
John

#1

BoldMinded (Brian)

What is the difference in the entry content for entries 2, 3, and 5?

#2

JohnDWells

They have different titles, and different Asset files selected, so pretty much everything.

These numbers are actually a result of a test setup, e.g. a fresh install of EE with only what I described above. In the working site where this was discovered, there are actually 7 entries, and anywhere from 18 to 31 asset files selected per entry - again, all unique files.

#3

JohnDWells

Brian - I just changed the Channel setting so that it isn’t ignored by Publisher. After having created translations for each entry in the channel, I’m still encountering this 100 limit of Asset files across the entries. I hope that helps narrow the search.

#4

BoldMinded (Brian)

Is this an environment you could provide FTP access to so I can see it first hand?

#5

BoldMinded (Brian)

John, out of curiosity, did you test this without Publisher being present at all? I know the entries tag has a default limit of 100 if no limit is defined, wondering if Assets has the same? Assets also uses an ext file to pre-query for all assets on the page at once, so that might explain why its an even 100. Did you try adding limit=”1000” to each tag?

#6

JohnDWells

I did try the limit=”1000” thing before and it didn’t help. I’ve just tried removing Publisher entirely, and I’m getting over 100 assets, same as the default language.

I can provide access to the staging server if you’d like but I was able to replicate this with a default install, so there’s nothing particular with the staging site (I wanted to rule out my setup because it has developed some “quirks” along the way).

To test I installed Publisher & Assets on a clean 2.7.3, created one channel field group with one Asset field type, one Channel using that channel field group, then configured Publisher to ignore both Asset fields and that one Channel. I created 5 entries, with Asset files in each to total more than 100, and then a template file with the following:

{exp:channel:entries}
 <h1>
 {title}:
 {cf_assets}{if count == 1}{total_files}{/if}{/cf_assets}
 </h1>
{/exp:channel:entries}
#7

BoldMinded (Brian)

Yeah, having access to the staging site would help a lot. Funny thing is I don’t think “100” exists anywhere in the code base, so I’m not sure where this limit is being imposed.

#8

BoldMinded (Brian)

Seems I was wrong 😊

Open up the libraries/hooks/Publisher_hooks_base file and change the limit at the top.

class Publisher_hooks_base { protected $limit = 1000;

#9

JohnDWells

Bingo!

Thanks Brian.

#10

BoldMinded (Brian)

No problem. Unfortunately though, it doesn’t look like its obeying the limit parameter if added to the Assets tag pair. If you don’t need that then you should be site, but that is something I need to still fix.

Login to reply