Be sure to checkout our newest add-on Reading Time Pro!

Compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field (it's in the works).

Ticket: The entries are not translated.

Status Resolved
Add-on / Version Publisher 2.11.2
Severity
EE Version 5.2.6

pixi

Sep 30, 2019

Hi Brian,

I’m working on a dev site. Installed publisher since a certain time, made everything just as usual : the phrases, the templates, in short the website. Now I create the translations for the entries and when I test the website : the entries don’t translate when I click on links via {exp:publisher:languages} tag. The phrases are well translated but not the entries, it shows the entries in the default language, even when there is no translation for the entry.

So I made a super minimal template to try to find out what is happening but it doesn’t work better….

I switched on the Debugging & Output option and it gave me this :

Templates
    0.000015 / 5.0MB - Begin Template Processing -
    0.000029 / 5.0MB URI: accueil/test
    0.000032 / 5.0MB Template: accueil/test
    0.000038 / 5.0MB Retrieving Template from Database: accueil/test
    0.000433 / 5.1MB Retrieving Template from File
    0.000667 / 5.1MB Template Type: webpage
    0.000675 / 5.1MB Parsing Site Variables
    0.000855 / 5.1MB Config Assignments & Template Partials
    0.001035 / 5.1MB Parse Current Time Variables
    0.001067 / 5.1MB Parsing Segment, Embed, Layout, logged_in_*, and Global Vars Conditionals
    0.002873 / 5.2MB - Beginning Tag Processing -
    0.002881 / 5.2MB Detecting Tags in Template
    0.002939 / 5.2MB Running Tags
    0.003323 / 5.2MB Calling Tag: {exp:channel:entries channel="qui_sommes_nous" limit="1" disable="categories|category_fields|member_data|pagination" sort="asc"}
    0.011377 / 5.7MB Calling Extension Class/Method: Publisher_ext/channel_entries_query_result
    0.022960 / 6.1MB Calling Extension Class/Method: Super_restricted_entries_ext/channel_entries_query_result
    0.027422 / 6.4MB Calling Extension Class/Method: Publisher_ext/channel_entries_tagdata
    0.042905 / 12.5MB Calling Extension Class/Method: Publisher_ext/custom_field_modify_data
    0.044095 / 12.5MB Calling Extension Class/Method: Publisher_ext/custom_field_modify_data
    0.044382 / 12.5MB Calling Extension Class/Method: Publisher_ext/channel_entries_tagdata_end
    0.046765 / 12.1MB -> Data Returned
    0.046803 / 12.1MB Detecting Tags in Template
    0.046856 / 12.1MB Running Tags
    0.047119 / 12.2MB Calling Tag: {exp:publisher:languages entry_id="1" show_current="no"}
    0.049647 / 12.2MB -> Data Returned
    0.049662 / 12.2MB - End Tag Processing -
    0.049941 / 12.2MB Calling Extension Class/Method: Publisher_ext/template_post_parse
    0.050124 / 12.2MB - End Template Processing -
    0.050127 / 12.2MB Parse Global Variables
    0.051279 / 12.2MB Template Parsing Finished

where the line

0.042905 / 12.5MB Calling Extension Class/Method: Publisher_ext/custom_field_modify_data

with a warning icon.

Can you help me on this please? Thanks in advance.

#1

BoldMinded (Brian)

Sep 30, 2019

Did you go to Publisher’s diagnostics page to make sure all the hooks were installed and enabled?

What about the entries are not translated? Is the Title translated? What about other custom field types?

Did you clear your cookies and reload the pages?

Did you go directly to the URL instead of using the language switcher?

Did you output the {publisher:current_language_code} variable to make sure the site is in the language expected?

#2

pixi

Sep 30, 2019

I did everything :
- diagnostics page : “It looks like all of Publisher’s hooks are installed and enabled.”
- cookies cleard but nothing changed
- {publisher:current_language_code} output the right language code (when switching and direct access
- Show content fallback (FE) parameter is turned off

Nor the title nor the custom fields are translated. Honestly I don’t understand what is going on.

Another observation (that maybe has nothing to do with that) : when I created a translation of an entry that contains a grid field type, every fields were empty (as expected) except the grid field type that was filled with first language datas (even if Show content fallback (CP) is turned off).

#3

BoldMinded (Brian)

Sep 30, 2019

Have you tried a fresh EE install with just Publisher installed to see if the issue is still happening? There is probably a conflict or some very specific issue on your current install that is the problem, b/c if this was a widespread bug I would be hearing about it from other people, and could replicate it in my installs.

#4

pixi

Oct 01, 2019

Before doing that I started to uninstall every add-on one by one to test and .... I found the guilty one !!! :D

It is : Super Restricted Entries https://devot-ee.com/add-ons/super-restricted-entries  (it uses the channel_entries_query_result hook).

Even though we have to use a parameter in the channel entries tag to check if the add-on has to be used or not, it seems that it cracks Publisher down even for the channel tag where I don’t use it….

I first of all need to use Publisher for this website but if I could use both that will arrange me.

What I have to do to fix? See with Super Restricted Entries developer or you?

#5

BoldMinded (Brian)

Oct 01, 2019

Yep, that happens when developers don’t use hooks correctly. They need to check the last_call property, e.g.

public function channel_entries_query_result($channel, $results)
    {
        if (ee()->extensions->last_call !== false) {
            $results = ee()->extensions->last_call;
        }
#6

pixi

Oct 02, 2019

I contacted Super Restricted Entries developer with the informations you gave to me and they fixed the issue very fast.

Thanks for your support even if it was not Publisher’s fault (I didn’t know at that time).
I am happy to trust you to translate my websites.

#7

BoldMinded (Brian)

Oct 02, 2019

Not a problem at all. Glad it was an easy fix 😊

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.