All add-ons currently require PHP 7.4 or greater.

On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.

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: 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

Dec 02, 2019

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?

#1

BoldMinded (Brian)

Hi 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.

#2

Verve -Webdesign und Grafik

Hi Here is the code. The tag

{exp:publisher:translate_category cat_id="{category_id}"}{cat_name}{/exp:publisher:translate_category}

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}

  &#123;/if&#125;
 </div>
</div>
<div class="col-md-8">
 <div class="mb-4">
  <strong>&#123;title&#125;</strong>

  &#123;if cf_kontakte_funktion&#125; 
   &#123;cf_kontakte_funktion&#125; 


  &#123;/if&#125;

  &#123;if cf_kontakte_telefon&#125; 


   <i class="fa fa-phone" aria-hidden="true"></i> &#123;cf_kontakte_telefon&#125; 
  &#123;/if&#125;
  &#123;if cf_kontakte_mail&#125; 


   <a href="mailto:{cf_kontakte_mail}"><i class="fa fa-envelope-o" aria-hidden="true"></i></a> 
  &#123;/if&#125;
 </div>
</div>

</div>
{/exp:channel:entries} {/categories} {/exp:channel:category_archive} <pre><code>

#3

Verve -Webdesign und Grafik

Comment has been marked private.

#4

BoldMinded (Brian)

Create a debug template that contains only the bare minimum code, e.g.

{exp:channel:category_archive channel=“kontakte” style=“linear” show_empty=“no”}
    {categories}
        {exp:publisher:translate_category cat_id=”{category_id}”}{cat_name}{/exp:publisher:translate_category}
    {/categories}
{/exp:channel:category_archive}

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.

{exp:channel:category_archive channel=“kontakte” style=“linear” show_empty=“no”}
    {categories}
        {cat_name} <!-- or whatever the correct EE variable name should be -->
    {/categories}
{/exp:channel:category_archive}
#5

Verve -Webdesign und Grafik

With your example all the category-names will be shown, but not in a translated version (still de instead of en)

#6

BoldMinded (Brian)

Ok, 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?

#7

BoldMinded (Brian)

Try adding a var_prefix. Should fix it. The {cat_name} field is colliding with EE’s native value.

{exp:channel:category_archive channel="pages" style="linear" show_empty="no"}
    {categories}
        {exp:publisher:translate_category cat_id="{category_id}" var_prefix="cat:"}{cat:cat_name}{/exp:publisher:translate_category},
    {/categories}
{/exp:channel:category_archive}
#8

Verve -Webdesign und Grafik

It 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?

#9

BoldMinded (Brian)

I 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

#10

Verve -Webdesign und Grafik

Had a mistake in the code - now works perfect. Thanks a lot!

Login to reply