Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPML plugin issue - Documented fix #9362

Open
TonyKnibb-MakaraHealth opened this issue Dec 20, 2024 · 3 comments
Open

WPML plugin issue - Documented fix #9362

TonyKnibb-MakaraHealth opened this issue Dec 20, 2024 · 3 comments
Assignees
Labels
Topic: WordPress WordPress-specific Type: Fix Content Issue or PR to resolve incorrect information in the docs

Comments

@TonyKnibb-MakaraHealth
Copy link

TonyKnibb-MakaraHealth commented Dec 20, 2024

I think these docs are incorrect: https://docs.pantheon.io/plugins-known-issues#wpml---the-wordpress-multilingual-plugin

Expected behavior

.mo files are created in the languages/wpml directory

Actual behavior

.mo files are created in a languages/wpml/wpml directory

Steps to reproduce the problem

Following the docs results in the creation of a wpml directoryinside the wpml directory, and an unhappy website.
define( 'WP_LANG_DIR','/files/languages/wpml' );

Suggested Resolution

Looking at the existing directorystructure that the plugin has created, suggests that the correct setting would be:
define( 'WP_LANG_DIR','/files/languages' );

Additional information

Is it also worth noting in the docs that, when connecting using SFTP via the Windows 11 Terminal, you can use ln -s uploads/languages languages to create the necessary symlink, assuming you're in the /code/wp-content directory?

Copy link

👋 @TonyKnibb-MakaraHealth
Thanks for opening your first issue here! @pantheon-systems/docs-admins is excited to review this!

If you like this project, please ⭐star⭐ our repo.

@rachelwhitton
Copy link
Member

rachelwhitton commented Jan 3, 2025

The solution for Issue 3 currently suggests that you have to create a symlink AND adjust the WP_LANG_DIR constant. I suspect only one of these is needed, not both

  • If you don't adjust the WP_LANG_DIR constant then you can fix via symlink to the uploads dir
  • If you don't symlink, you can fix by setting WP_LANG_DIR to $_SERVER['HOME'] .'/files/languages'

Either way, you'd still need to manually create the ./files/languages and ./files/languages/wpml directories on Pantheon via SFTP. Then update translations, and check folder contents - we should see .mo files generated in that path now

You shouldn't have to set WP_TEMP_DIR, that's handled by wp-config-pantheon.php (source)
You shouldn't have to set FS_METHOD to direct, that's already handled by the Pantheon MU plugin (source)


We should test and validate the above and if true, remove the symlink suggestions and align with the WPML recommendations here

@stevector @jazzsequence do either of you have a WPML license we can use to validate the above?

@TonyKnibb-MakaraHealth if you have interest and time to help us validate the above, please do and let us know your results. We'll work on this issue either way 🙂 Thanks for reporting

@rachelwhitton rachelwhitton self-assigned this Jan 3, 2025
@rachelwhitton rachelwhitton added Type: Fix Content Issue or PR to resolve incorrect information in the docs Topic: WordPress WordPress-specific labels Jan 3, 2025
@stevector
Copy link
Contributor

I do not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Topic: WordPress WordPress-specific Type: Fix Content Issue or PR to resolve incorrect information in the docs
Projects
None yet
Development

No branches or pull requests

3 participants