Ce sujet est résolu. Voici une description du problème et de la solution.
Problem: You translated a page on your website and the translated page displayed with the layout of a Word document. Solution: We discovered a PHP Fatal error indicating a type mismatch in the pagination function, where a string was passed instead of an integer. To resolve this, we recommend you re-save the 'Number of listings to display' field in French, setting it to an integer value, such as 9.
If this solution does not resolve your issue or seems outdated, or if it does not apply to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket at WPML support forum.
Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.
Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.
Contexte de la question:
I translated a page on my website, lien caché, and I am trying to achieve a proper translation with the classic website layout.
Symptômes:
The translated page has the layout of a word page and does not appear in the overview of translated pages.
Questions:
Why does the translated page have the layout of a word page?
Why is the translated page not showing up in the overview of translated pages?
Les langues: Anglais (English )Français (Français )
Fuseau horaire: America/Lima (GMT-05:00)
Bonjour,
Merci d'avoir contacté le support de WPML. Commençons par remplir les exigences minimales de WPML. Je vois que vous avez une allocation de mémoire PHP très basse (40M). La configuration minimale requise pour WPML est de 128M, mais nous recommandons 256M :
- Accédez à votre serveur via FTP et ouvrez le fichier wp-config.php (dans le root de votre WordPress).
- Insérez ces lignes juste avant /* That's all, stop editing! Happy blogging. */
Maintenant, en ce qui concerne la mise en page, cela est dû à une erreur critique sur votre site. Veuillez activer WP_DEBUG pour avoir plus de détails sur l'erreur. Cela nous aidera à identifier la cause.
- Accédez à votre serveur via FTP et ouvrez wp-config.php (à la racine de votre installation WordPress).
- Insérez ces lignes just avant /* That's all, stop editing! Happy blogging. */
- Reproduisez le problème en visitant la page Française, puis accédez au fichier debug.log ici: /wp-content/debug.log et copiez/collez l'information dans votre prochaine réponse. Plus d'info: https://wordpress.org/support/article/debugging-in-wordpress/
Hello, thanks your for your advice. Unfortunately I have no idea where and how to do that. I have no coding skills at all. Is there a way to solve this anyway? Thanks in advance
Les langues: Anglais (English )Français (Français )
Fuseau horaire: America/Lima (GMT-05:00)
Hi,
Could you please provide me with a temporary admin access (wp-admin and FTP) – preferably to a test site where the issue has been replicated – so I can help you out. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team). Don't share your own admin account, create a new one that you will delete when we finish troubleshooting.
IMPORTANT: Before we proceed, please backup your site and database.
PS: If you can't give me access to an FTP account, please install the plugin "WP File Manager".
Les langues: Anglais (English )Français (Français )
Fuseau horaire: America/Lima (GMT-05:00)
Hi,
Thanks for the access. The error log gave the following information:
PHP Fatal error: Uncaught TypeError: houzez_pagination(): Argument #3 ($listings_per_page) must be of type ?int, string given, called in /homepages/3/d4298614692/htdocs/clickandbuilds/MeinHausinFrankreich/wp-content/themes/houzez/template/template-listing-list-v2-fullwidth.php on line 75 and defined in /homepages/3/d4298614692/htdocs/clickandbuilds/MeinHausinFrankreich/wp-content/themes/houzez/framework/functions/helper_functions.php:3663
The pagination used in the listing from that page was receiving a string (text) instead of receiving an int (number) as the number of post to display per page.
I'm not sure what caused the issue in the first place but resaving the "Number of listings to display = 9" field in French resolved the issue.
Could you please test it? Check another page with listing to see if it's a general issue that needs more investigation or if it was an exception with that page.
Hey Nicolas, thanks for your quick help. Well hats strange. You think that might come from string translations? I checked this page with another listing and it looks good so far in order to the listing. (lien caché)
However I noticed that the layout of the main menu is broken now in the french version. On all pages. Pls see the screenshots. The phone number, button at profil is not at the same line anymore. It "moved to far" I guess.
And I noticed that the page you resolved works fine, but instead that the text is after the listing, in the french version now it's before the listing. (pls see screenshots)
Kindly
Martin
Les nouveaux fils créés par Nicolas V. et associés à celui-ci sont repris ci-dessous :
Les langues: Anglais (English )Français (Français )
Fuseau horaire: America/Lima (GMT-05:00)
Glad to hear that it now works now.
If the other listings are working fine it could be either an exception (an issue when the field got saved) or a human mistake (entering a letter instead of the number 9).
Keeping one issue by forum threat helps to keep the forum clean and organized, it will also help other users with similar problems to find solutions when searching the forum.