Skip Navigation

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 15 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year, 8 months ago.

Assisted by: Waqas Bin Hasan.

Author Posts
August 4, 2023 at 2:13 pm #14155369

martinG-4

I am trying to: use PDF Invoices & Packing Slips for WooCommerce and generate an invoice in EN and the site's default is FR.

When i generate the PDF invoice using the PDF invoice button in the order admin page, i get and order that has EN product info and the rest of the invoice is in FR. If i reload the pdf invoice it corrects to EN for all the invoice text.

invoice_initial.png
invoice_after_reload.png
August 7, 2023 at 8:51 am #14161981

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

First of all I'll advise to fix the followings:

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

1) Update PHP version to at-least 7.4 which is recommended by WordPress itself (https://wordpress.org/about/requirements/).

2) Fix “WP Memory Limit” to at least 128MB while 256MB is recommended. See https://wpml.org/home/minimum-requirements/ for detailed information. You can set this in your wp-config.php file by adding following code:

define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Remember to add these lines before the line where it says:
/* That's all, stop editing! Happy publishing. */

Once these are fixed, clear all caches and retry. I hope this should resolve the problem.

3) However, if problem isn't fixed, I'll need some more information like what "reload" actually means? I mean do you reload the PDF file (i.e. closing/reopening) or generate the invoice again?

Further, I checked in our plugins compatibility list (https://wpml.org/plugin/?wpv_view_count=120064&wpv-plugin-functionality=0&wpv_post_search=PDF+Invoices+%26+Packing+Slips+for+WooCommerce&wpv-wpcf-recommendation-flag=&wpv_filter_submit=Search) and found 2 plugins. One isn't compatible while other is. But I am not sure which one is exactly you are using. Please have a look and let me know.

Regards.

August 10, 2023 at 12:32 am #14178813

martinG-4

I answered by email with details 3 days ago!! Why did it not catch?
ok so updated to php 8 and up the memory limit params like you requested. still getting the same issue.

ive attached a screencast/

when i press the PDF invoice button in the order admin screen, it opens a new tab and loads the PDF invoice in it with mixed languages (FR and EN), if i click the URL bar and hit enter it reloads the invoice all in the correct language.
Screencast at: hidden link

August 10, 2023 at 7:43 am #14179833

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the details. You'll have to follow the link to this thread and can reply from here. Emails are not caught up.

May I ask for admin access to your website to check the issue in detail? You can create a separate admin user for this purpose, which can be deleted afterwards.

Also provide detailed steps to reproduce the issue and links to pages in admin and on frontend.

Remember to take full backup of your website and database before proceeding. However, a staging/test site is highly recommended, because I may need to try some changes/fixes on the site (including plugins & themes deactivation), which may cause conflicts with the live site otherwise.

Please confirm it in your next reply or let me know if you do not agree with the mentioned.

I've set your next reply as private to share this information safely.

IMPORTANT: If you don't see the section for providing access information, do not write in the message box or the information may appear as public.

See https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/ for details on privacy and security.

August 18, 2023 at 7:09 am #14250035

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for providing the access. I'll check soon and work accordingly and 'll get back to you accordingly.

August 18, 2023 at 12:49 pm #14252569

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I checked in your staging site following the same steps you showed in your screen recording (earlier). But I can't reproduce the issue.

I've recorded my activity, please download from hidden link

As you can see that PDF Invoice was generated in the same language as admin's (set in user's profile). I couldn't find mix of languages on the PDF.

I however, had cleared WP Rocket cache beforehand. You can also try that. But the difference I see is perhaps the browser. You are using Safari while I tried in Chrome's Incognito mode.

So I'll recommend checking in other browsers and also in incognito modes. Because this looks like browser's caching (i.e. local session is cached). You can also set your browser to disable caching.

August 18, 2023 at 2:35 pm #14253209

martinG-4

You did reproduce the issue. the invoice is in EN but the Woocommerce products are in FR (see screenshot). Also hitting reload button on the browser doesn't "fix" the languages, you have to click the cursor in the URL bar and hit enter on your keyboard....

Screenshot 2023-08-18 at 10.26.10 AM.png
August 21, 2023 at 6:52 am #14260063

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

You are right, I didn't notice that I have to actually put my cursor in the address bar and hit enter. This is strange. But I've noted the reason.

The "lang" parameter isn't being preserved, although you've set it in WPML -> Languages. While, the same invoice can be seen "almost" correctly with the 2 buttons above this "PDF Invoice" button, which are for both languages separately. However, they still somehow/sometimes need a push (cursor in address bar and enter).

But once the lang param is available and if you've hit it (once), it stays fine.

To further investigate the issue, I updated the WordPress, deactivated several plugins, including WPML, so I could update WPML', but looks like due to some sitekey issue I can't upload.

So I deleted WPML and String Translation but when trying to upload I am running into "Something went wrong" and sometimes it says "The link you followed has expired." or "413 Request Entity Too Large".

Can you please provide me FTP access to this staging site? So I can manually remove and update the plugins. And then continue with further testing.

I've set your next reply as private again.

August 28, 2023 at 8:22 am #14298107

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the FTP access, I was able to update the plugins. And this didn't make any difference.

I am trying to reproduce the problem in a fresh installation so I can escalate the issue to our 2nd tier. I'll update you soon on this.

Please keep the staging site access open.

August 29, 2023 at 6:51 am #14304189

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation. I was able to reproduce the issue in the sandbox site (hidden link) and 've escalated the issue to our 2nd tier team for investigation.

I'll update you as soon as I hear back.

August 30, 2023 at 5:54 am #14310039

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Just an update that issue has further been escalated to our compatibility team. I'll keep you posted.

August 31, 2023 at 11:00 am #14319721

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

Team suggests to use the "Professional" version of the plugin. Because as per our WPML compatible plugins list, the current plugin isn't recommended (https://wpml.org/plugin/?wpv_view_count=120064&wpv-plugin-functionality=0&wpv_post_search=PDF+Invoices+%26+Packing+Slips+for+WooCommerce&wpv-wpcf-recommendation-flag=&wpv_filter_submit=Search).

You can find that on plugin dev's site at hidden link.

Please try this and let me know.

pdf.jpg
August 31, 2023 at 11:30 am #14320109

martinG-4

I installed the Pro version and now its even worse, i can only get the FRENCH version of the invoice, no matter if the admin user logged in is using the FR or EN language in the Admin area.

August 31, 2023 at 12:53 pm #14320703

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for trying that.

I am checking in your staging but can't see it installed, perhaps you tried on the live site? Can you please copy that plugin to the staging or to this sandbox hidden link.

Since this plugin is compatible, I can then test and update my team and they can look into it.

August 31, 2023 at 1:17 pm #14320945

martinG-4

Sorry i installed it on their staging site, installed it on your test version.