Learn icon indicating copy to clipboard operation
Learn copied to clipboard

Installing TranslatePress Pro on Learn

Open kaitohm opened this issue 1 year ago • 5 comments

@sareiodata Dev work has started to launch Learning Pathways on Learn (project details) and a staging site has been created for that work: https://learn.wordpress.org/test/

TranslatePress has been installed and activated on this staging site so that we can test this out at the same time before putting it on the live site.

  1. Could we ask you for a perpetual license, as discussed in https://github.com/WordPress/Learn/issues/2339#issuecomment-2009376244?
  2. Upon activating the plugin, @adamwoodnz is noticing a white-screen-of-death intermittently. This seems to be related to a missing TranslatePress table wp_trp_gettext_original_strings. Would you have any information about why this might be happening?
[15-May-2024 08:11:54 UTC] WordPress database error Table 'wp_trp_gettext_original_strings' doesn't exist for query SELECT id, original, domain, context FROM `wp_trp_gettext_original_strings` WHERE BINARY wp_trp_gettext_original_strings.original IN ('Manage Comments') made by TRP_Gettext_Insert_Update::gettext_original_strings_sync

kaitohm avatar May 16 '24 05:05 kaitohm

It appears that in addition to the license, we'll need to install the non-free plugin, so we'll need somewhere to download that from ongoing (as we can't use the WP plugin update process)

Additionally; Where should we file bugs for TranslatePress?

In addition to the WSOD reported above, where TP is failing to use the proper table prefix, it's also seemingly assuming it's active on other sites in the network, and running operations in the context of other blogs (ie. It's active on Blog ID 5, but during the admin toolbar switch_to_blog( 1 ) happens in the My sites list, the plugin then starts erroring because it's not active on ID 1, and wp_1_trp... doesn't exist, so it inserts logs in the error option, and that starts growing massive.. This is hard to explain.. :)

dd32 avatar May 16 '24 06:05 dd32

@bsanevans For license & paid addon please let me know of an email address to create an account and the license. I can also create one on my own account and just provide the license and zip file. Regardless it works for me.

I'll get back to you regarding the tables not being created and the weird Multisite functionality. It's quite possible there are some bugs there, TP rarely gets used in Multisite.

As for bug reports, either the free WordPress forum or directly on our website.

sareiodata avatar May 16 '24 06:05 sareiodata

@sareiodata I think we can use learn @wordpress.org for the account.

dd32 avatar May 16 '24 07:05 dd32

Regarding the bugs:

  • we have an old ticket regarding switch_to_blog makes gettext insert repeated translations in a different subsite. So far we're not sure what's causing it, but will look at it next week.
  • as for the table, we never could replicate this issue. Is there a chance for an export or staging where this is happening?

Regarding the license:

  • I've create it. You can login with the learn at wp.org email address over at https://translatepress.com/account/ or reset the password.

sareiodata avatar May 16 '24 08:05 sareiodata

Hi,

I've managed to replicate the reported bug causing those SQL errors due to targeting the wrong site tables. I am currently working on a solution and I will get back to you with updates.

Thank you for providing lots of details about this issue.

Edit 29th May: It's still work in progress, we are trying to figure out a way to use the current site prefix instead of accidentally using the main site in specific functions related to the admin bar. This is due to the fact that $wpdb global changes.

razvan-translatepress avatar May 23 '24 14:05 razvan-translatepress

Hi @razvan-translatepress how are the fixes going please? We've just launched the redesigned Learn WordPress site, so we're keen to see if we can get this initiative moving again too now.

adamwoodnz avatar Aug 05 '24 20:08 adamwoodnz

Hi, We found a fix for the mentioned problems. It should be included in the next update in about a week or so. Thank you again for reporting the issues.

razvan-translatepress avatar Aug 08 '24 14:08 razvan-translatepress

Thanks @razvan-translatepress, great news!

adamwoodnz avatar Aug 08 '24 21:08 adamwoodnz

Launched TranslatePress - Multilingual version 2.8.3 which contains the fix for the reported issue. Let me know if it works for you.

razvan-translatepress avatar Aug 14 '24 17:08 razvan-translatepress

✅ TranslatePress has been upgraded to 2.8.3 and re-enabled on the test site.

adamwoodnz avatar Aug 19 '24 00:08 adamwoodnz