-
Notifications
You must be signed in to change notification settings - Fork 110
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
Conflict with Custom Field Suite plugin #1037
Comments
In fact Normally, the REQUEST['qtranslate-fields'] should look like
What do you have in your case? |
Whit this plugin you can add new metabox with editor fiield! If qtranslate is active when you save page you get error. The error is: Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in ..... /wp-content/plugins/qtranslate-xt/qtranslate_utils.php on line 389 Its because we have second editor here. |
My intention is to strongly type the arguments even more in the future with modern versions of PHP so I'd rather avoid handling this with a loosely defined type in How does your |
array(5) { ["post_title"]=> array(2) { ["bg"]=> string(12) "Начало" ["en"]=> string(4) "Home" } ["content"]=> array(2) { ["bg"]=> string(0) "" ["en"]=> string(0) "" } ["btmenu_text"]=> array(2) { ["bg"]=> string(0) "" ["en"]=> string(0) "" } ["cfs"]=> &array(1) { ["input"]=> &array(2) { [1]=> array(1) { ["value"]=> array(2) { ["bg"]=> string(0) "" ["en"]=> string(0) "" } } [6]=> &array(2) { [0]=> &array(1) { [5]=> &array(1) { ["value"]=> &array(2) { ["bg"]=> array(1) { [0]=> string(11) "fcgjhgfhjg1" } ["en"]=> array(1) { [0]=> string(11) "fcgjhgfhjg2" } } } } [1]=> array(1) { [5]=> array(1) { ["value"]=> array(3) { ["bg"]=> array(1) { [0]=> string(7) "sfgd bg" } ["en"]=> array(1) { [0]=> string(7) "sfgd en" } ["qtranslate-separator"]=> string(1) "[" } } } } } } ["excerpt"]=> array(3) { ["bg"]=> string(0) "" ["en"]=> string(0) "" ["qtranslate-separator"]=> string(1) "[" } } array(1) { [0]=> string(11) "fcgjhgfhjg1" } |
Hello. This is happening to me as well. I may provide details if you need. The proposed fix did the trick, but it would be nice to further investigate the issue |
function qtranxf_isMultilingual($input): bool { function qtranxf_has_multilingual_content(?string $str): bool { |
Very bad error. I have installed plugin https://wordpress.org/plugins/custom-field-suite/
latest WP, php 7.4 latest QT-xt-3.10.1
In admin page has meta-box with dynamic fields, when page is saved error is displayed.
Pleace HELP.
Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, array given in /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/qtranslate_utils.php:389 Stack trace: #0 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/qtranslate_utils.php(389): preg_match('/<!--:[a-z]{2,3...', Array) #1 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(47): qtranxf_isMultilingual(Array) #2 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(62): qtranxf_collect_translations(Array, Array, 'bg') #3 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(62): qtranxf_collect_translations(Array, Array, 'bg') #4 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(62): qtranxf_collect_translations(Array, Array, 'bg') #5 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(62): qtranxf_collect_translations(Array, Array, 'bg') #6 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(62): qtranxf_collect_translations(Array, Array, 'bg') #7 /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(96): qtranxf_collect_translations(Array, Array, 'bg') #8 /home/myfolder/public_html/wp-includes/class-wp-hook.php(292): qtranxf_collect_translations_posted('') #9 /home/myfolder/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #10 /home/myfolder/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #11 /home/myfolder/public_html/wp-settings.php(423): do_action('plugins_loaded') #12 /home/myfolder/public_html/wp-config.php(90): require_once('/home/myfolder/...') #13 /home/myfolder/public_html/wp-load.php(37): require_once('/home/myfolder/...') #14 /home/myfolder/public_html/wp-admin/admin.php(34): require_once('/home/myfolder/...') #15 /home/myfolder/public_html/wp-admin/post.php(12): require_once('/home/myfolder/...') #16 {main} thrown in /home/myfolder/public_html/wp-content/plugins/qtranslate-xt/qtranslate_utils.php on line 389
ONLY THIS FIX HELPS
function qtranxf_isMultilingual( $str ) {
$lang_code = QTX_LANG_CODE_FORMAT;
}
The text was updated successfully, but these errors were encountered: