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

Unable to add/edit post forms if the site language is set to Simplified Chinese (zh_CN) #1397

Closed
hexie2108 opened this issue Nov 25, 2023 · 1 comment · Fixed by #1379
Closed

Comments

@hexie2108
Copy link

20231125210707

Problem:
Unable to add/edit post forms if the site language is set to Simplified Chinese (zh_CN), will appear the blank page just like in the photo.

Version:
Wordpress 6.4.1 + WP User Frontend 3.6.9

How to reproduce the problem:

  • install a new wordpress site
  • set the website language to Simplified Chinese in the options-general page
  • install the plugin WP User Frontend
  • when trying to add a new post-forms, the blank page will apear .

How to resolve the problem (temporary):

  • delete '\wp-content\languages\plugins\wp-user-frontend-zh_CN.mo'
  • delete '\wp-content\languages\plugins\wp-user-frontend-zh_CN.po'
  • delete '\wp-content\plugins\wp-user-frontend\languages\wp-user-frontend-zh_CN.mo'
  • open '\wp-content\plugins\wp-user-frontend\languages\wp-user-frontend-zh_CN.po' using a editor like 'Poedit' and rebuild a new copy of '\wp-content\plugins\wp-user-frontend\languages\wp-user-frontend-zh_CN.mo'
@sapayth
Copy link
Member

sapayth commented Nov 27, 2023

Hello @hexie2108,
Sorry to hear about your problem.

It is causing for the translation. In wp-content/plugins/wp-user-frontend/admin/class-admin-settings.php
please replace line no: 87 to
$this->menu_pages[] = add_menu_page( __( 'WP User Frontend', 'wp-user-frontend' ), 'User Frontend', $capability, 'wp-user-frontend', [ $this, 'wpuf_post_forms_page' ], 'data:image/svg+xml;base64,' . base64_encode( '<svg width="83px" height="76px" viewBox="0 0 83 76" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="wpuf-icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="ufp" fill-rule="nonzero" fill="#9EA3A8"><path d="M49.38,51.88 C49.503348,56.4604553 45.8999295,60.2784694 41.32,60.42 C36.7400705,60.2784694 33.136652,56.4604553 33.26,51.88 L33.26,40.23 L19,40.23 L19,51.88 C19,64.77 29,75.25 41.36,75.26 L41.36,75.26 C47.3622079,75.2559227 53.0954073,72.7693647 57.2,68.39 C61.4213559,63.9375842 63.7575868,58.0253435 63.72,51.89 L63.72,40.23 L49.38,40.23 L49.38,51.88 Z" id="Shape"></path><polygon id="Shape" points="32.96 0.59 0 0.59 3.77 16.68 32.96 16.68"></polygon><path d="M68,0 L49.75,0 L49.75,16.1 L68,16.1 C68.74,16.1 69.39,17.1 69.39,18.24 C69.39,19.38 68.74,20.38 68,20.38 L49.75,20.38 L49.75,36.5 L68,36.5 C76,36.5 82.5,28.31 82.5,18.25 C82.5,8.19 76,0 68,0 Z" id="Shape"></path><polygon id="Shape" points="32.96 20.41 5.31 20.41 9.07 36.5 32.96 36.5"></polygon></g></g></svg>' ), '54.2' );

and in wp-user-frontend/admin/form.php please replace line no: 36 to
add_action( 'wpuf_load_post_forms', [ $this, 'post_forms_builder_init' ] );

contact support here if you are having problem implementing the above solution or for any queries.

@sapayth sapayth linked a pull request Dec 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants