Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client was experiencing an issue with the display of posts of a custom post type (CPT) named 'Kolekcje' across different languages in the archive. Despite setting the CPT to 'translatable' as per the documentation, the posts were not displaying correctly.
Solution:
We reviewed the client's website and found that the issue seemed to be resolved, with all English Collections having the 'published' status and no duplicates in the archive pages. We asked the client if they had used the

'suppress_filters' => false

function in their code, as it could be related to the issue. We requested the current status of the project to provide further assistance.
If this solution doesn't look relevant to your situation, please open a new support ticket with us.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 18 replies, has 2 voices.

Last updated by Lucas Vidal de Andrade 12 months ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
November 16, 2023 at 11:14 am #14824799

lukaszS-14

I have a problem with the display of posts of type Kolekcje from all languages in the archive. In the CPT settings I have "translatable" set according to the documentation and as for the other CPTs where it displays correctly

Screenshot_1.png
November 17, 2023 at 2:18 pm #14863495

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

thank you for reaching out to us. Your issue isn't yet clear to me. What is it that you want to achieve, and what are you getting instead? Every detail is important 🙂 Please provide me more information, so I can better assist you.

Furthermore, I noticed that your website has not enough memory allocated. WPML requires a memory limit of at least 128MB while 256MB is recommended (see how to increase WP memory). Please increase the memory and let me know how it goes.

Best regards,
Lucas Vidal

November 17, 2023 at 2:49 pm #14863921

lukaszS-14

On the collection archive page
hidden link
hidden link
posts from both languages appear to me. At the moment I have the English versions of the posts set as drafts so that they don't duplicate in the view, but if I publish the English version of the collection posts, it shows up on the Polish version of the archive as well as the English version, next to the Polish version of that collection post

If I go to the English version of the archive, it should be empty, because there are no published collections in English and the Polish versions of the collections posts show up
hidden link

Regarding the memory limit, I increased the limit on the server and the site status in wordpress tools shows correctly, 512M according to the settings. The tools tab in WPML shows that there is not enough memory.I am sending a screenshots with this data

stanwitryny.png
wpml.png
November 17, 2023 at 5:10 pm #14865407

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I understand. We had another user with a similar issue. Please see if your Posts and Pages translation mode are set to Translatable (use translation if available or fallback to default language) from WPML > Settings > Post Types Translation. This means that if you don't translate any content, it will display the default language.

To ensure that untranslated language won't show on the different language page, you must change the settings to Translatable (only show translated items) as shown in the screenshot.

Regarding the memory, it still shows to me as if your WP Memory limit is set to 40M. Please ensure that you have these two lines on your wp-config.php file:

define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');

Tell me how it goes and if you need further assistance.

Best regards,
Lucas Vidal

Duplicated Posts.png
November 20, 2023 at 10:37 am #14875171

lukaszS-14

Settings for posts and pages are set correctly (screen).
Memory settings, in the case of this hosting, are not through wp-config.php a php.ini. The screen shot shows the memory settings for this page. WPML continues to show as if the memory is set to 40mb

pamiec2.png
pamiec.png
ustawienia.png
November 20, 2023 at 11:26 am #14875849

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hallo,

danke für die Informationen. Ich würde mir das gerne direkt auf Ihrer Seite ansehen. Dazu bräuchte ich bitte temporären Zugriff (WP-Admin und FTP) auf Ihre Seite, vorzugsweise zu einer Test/Staging Seite, an der das Problem nach Möglichkeit repliziert wurde.

Die dafür benötigten Felder finden Sie unterhalb des Kommentarbereichs. Die Informationen, die Sie eingeben, sind privat, d.h. nur Sie und ich können sie sehen und haben Zugriff darauf.

Vielleicht muss ich Ihre Website lokal replizieren. Dazu muss ich vorübergehend ein Plugin namens "Duplicator" oder "All in One WP Migration" auf Ihrer Website installieren. Dadurch kann ich eine Kopie Ihrer Website und Ihrer Inhalte erstellen. Sobald das Problem behoben ist, werde ich die lokale Website löschen. Lassen Sie mich wissen, ob dies für Sie in Ordnung ist.

WICHTIG

Bitte erstellen Sie eine Sicherungskopie der Site-Dateien und der Datenbank, bevor Sie uns Zugang gewähren.

- Wenn Sie die wp-admin/FTP-Felder nicht sehen, bedeutet dies, dass Ihre Post- und Website-Login-Daten ÖFFENTLICH gemacht werden. Posten Sie Ihre Website-Details NICHT, wenn Sie die erforderlichen wp-admin/FTP-Felder nicht sehen. Wenn Sie das nicht tun, bitten Sie mich, die private Box zu aktivieren. Die private Box sieht wie folgt aus:

hidden link

Viele Grüße,
Lucas Vidal

November 20, 2023 at 4:33 pm #14879639

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

I just noticed I sent you the instructions in German, I apologize. I tried logging in using the credentials you sent, but unfortunately I got a message saying that the information is incorrect. Could you please check the login data for me? I marked the next reply as private as well.

Best regards,
Lucas Vidal

November 21, 2023 at 3:16 pm #14888473

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

after checking your site again, I've noticed that the posts on hidden link are all in Polish and the posts on hidden link are all in English, as expected. Can you please confirm me that the issue was resolved?

As for the memory, your wp-config.php file must contain the lines I sent above, regardless of how your hosting works:
define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');

These two files have different functions. The php.ini file will set how the PHP is handled by the server as a whole whereas wp-config.php will configure how the specific installation works.

Please read this documentation, to translate custom fields: https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/

Best regards,
Lucas Vidal

November 22, 2023 at 9:45 am #14894797

lukaszS-14

The problem on the site continues.
As I wrote, the posts in the English version are currently set as "drafts," which is why they do not display.
If we change the status in any post "kolekcje" in the English version from "draft" to "publish" on the catalog
hidden link
duplicate posts are displayed. Currently you can't see this because my client can't see the duplicate posts, you have to change at least one English entry to "published".

Now I thought if it could be an issue related to the filter everything pro plugin, which is installed there and which affects the querry of posts

doubleCollections.png
pomoctechniczna.png
wp-config.png
November 22, 2023 at 10:06 am #14895343

lukaszS-14

I checked to see if posts duplicate if I disable the filter everything pro plugin is active.
The problem continues.
And when we use filters to show posts from only one category the duplicates do not appear
It uses the standard get_post to pull posts from wordpress

postquerry.png
November 22, 2023 at 10:37 am #14895749

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for the information. In order to be able to publish the posts in English and investigate the problem in more detail, I will create a local copy of your website. To do this, I will need to temporarily install a plugin called "Duplicator" or "All in One WP Migration" on your website. This will allow me to create a copy of your website and content. Once the issue is resolved, I will delete the local website. Let me know if this works for you.

November 22, 2023 at 11:01 am #14896263

lukaszS-14

Again you answer in German 😛
Duplicator is already installed. You can make a copy, I would advise you not to import all uploads because the package can be heavy.
I understand that you will create a copy of the site on your computer/environment?

November 22, 2023 at 12:21 pm #14897401

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

I'm sorry! I translated it to English. Yes, I'll create a local copy to investigate it better 🙂

November 23, 2023 at 8:32 am #14904709

lukaszS-14

I look forward to hearing from you

November 23, 2023 at 1:53 pm #14908781

lukaszS-14

What is the situation?
We care about time and this problem is blocking the introduction of the English version on the site