Compatibility updates:
- Publisher is EE5 compatible, but it does not currently support the Fluid field (it's in the works).
Ticket: Categories Archive Tag not working anymore after update to Publisher 3.0
Status | Resolved |
Add-on / Version | Publisher 3.0 |
Severity | |
EE Version | EE 5.3.0 |
Verve -Webdesign und Grafik
7 days ago
Hi
I updated from EE 2.11.9 to EE 5.3.0 and stayed on Publisher 2.11.2 first
After having this problem I updated to Publisher 3.0 but didn’t change the problem.
I think the setup of the categories is correct and before it worked well but now the translation of the categories doesn’t work.
Any idea?
BoldMinded (Brian)
7 days agoHi there. “It doesn’t work” is not enough information for me to work off of, can you provide more information? You provided CP and FTP login, but didn’t tell me what URL to go to, or what template file I should look at? Logging into someone’s site also isn’t my first course of action. I only login into sites as a last resort. What template code isn’t working? Have you tried to simplify the issue? E.g. create only the very basic template code necessary to replicate the issue, then share that template code here in the ticket so I know what you’re referring to. Thanks.
Verve -Webdesign und Grafik
7 days agoHi
Here is the code.
The tag
ist not output in the second language (en)
I didn’t change the code that worked before.
<pre><code>
{exp:channel:category_archive channel=“kontakte” style=“linear” show_empty=“no”}
{categories}
<h2 class=“mt-4”>{exp:publisher:translate_category cat_id=”{category_id}”}{cat_name}{/exp:publisher:translate_category}</h2>
{exp:channel:entries
channel=“kontakte”
disable=“category_fields|member_data|pagination|trackbacks”
dynamic=“no”
category=”{category_id}”
order_by=“title”
sort=“asc”
}
<div class=“row”>
<div class=“col-md-4”>
<div class=“mb-4”>
{if cf_kontakte_bild}
{exp:ce_img:pair src=”{cf_kontakte_bild}”}
{made}
{/exp:ce_img:pair}
{/if}
</div>
</div>
<div class=“col-md-8”>
<div class=“mb-4”>
{title}
{if cf_kontakte_funktion}
{cf_kontakte_funktion}
{/if}
{if cf_kontakte_telefon}
<i class=“fa fa-phone” aria-hidden=“true”></i> {cf_kontakte_telefon}
{/if}
{if cf_kontakte_mail}
<i class=“fa fa-envelope-o” aria-hidden=“true”></i>
{/if}
</div>
</div>
</div>
{/exp:channel:entries}
{/categories}
{/exp:channel:category_archive}
<pre><code>
Verve -Webdesign und Grafik
7 days agoComment has been marked private.
BoldMinded (Brian)
7 days agoCreate a debug template that contains only the bare minimum code, e.g.
It’s been awhile since this has come up, but you shouldn’t need to call translate_category inside a category_archive tag. Publisher should translate them for you, e.g.
Verve -Webdesign und Grafik
6 days agoWith your example all the category-names will be shown, but not in a translated version (still de instead of en)
BoldMinded (Brian)
6 days agoOk, I will try to replicate this locally. In your original report you said you were on version 2.11.2, and it didn’t work in that version either, correct? Or it only stopped working after upgrading to 3.0?
BoldMinded (Brian)
6 days agoTry adding a var_prefix. Should fix it. The {cat_name} field is colliding with EE’s native value.
Verve -Webdesign und Grafik
6 days agoIt stopped working after update to EE 5.3.0 and beeing on Publisher version 2.11.2
Well, the var_prefix does it in the testcode/your example but not on my template with the code I posted in #2
Why this?
BoldMinded (Brian)
6 days agoI don’t know why it wouldn’t work in your full example, but it works in the simplest usage, so I would remove other parts of your template until it starts working again to determine what the conflict might be. I wrote a helpful article about debugging, might be worth the read. https://u.expressionengine.com/article/debugging-in-expressionengine
Verve -Webdesign und Grafik
6 days agoHad a mistake in the code - now works perfect. Thanks a lot!