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

Error editing fields #935

Closed
eliasfaical opened this issue Jan 6, 2021 · 9 comments
Closed

Error editing fields #935

eliasfaical opened this issue Jan 6, 2021 · 9 comments
Labels
module: ACF Integration with ACF need info The submitter must provide more info

Comments

@eliasfaical
Copy link

I am using WP 5.6 "QTX_VERSION": "3.9.1"

Fatal error: Uncaught InvalidArgumentException: Missing "qtranslate-edit-language" field in $_REQUEST! in /Applications/MAMP/htdocs/interfruit/site/wp-content/plugins/qtranslate-xt/admin/qtx_admin_utils.php:209 Stack trace: #0 /Applications/MAMP/htdocs/interfruit/site/wp-content/plugins/qtranslate-xt/admin/qtx_admin.php(90): qtranxf_getLanguageEdit() #1 /Applications/MAMP/htdocs/interfruit/site/wp-includes/class-wp-hook.php(287): qtranxf_collect_translations_posted('') #2 /Applications/MAMP/htdocs/interfruit/site/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /Applications/MAMP/htdocs/interfruit/site/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /Applications/MAMP/htdocs/interfruit/site/wp-settings.php(420): do_action('plugins_loaded') #5 /Applications/MAMP/htdocs/interfruit/site/wp-config.php(98): require_once('/Applications/M...') #6 /Applications/MAMP/htdocs/interfruit/site/wp-load.php(37): require_once('/Applications/M...') #7 /Applications/MAMP/htdocs/interfruit/site/wp-admin/a in /Applications/MAMP/htdocs/interfruit/site/wp-content/plugins/qtranslate-xt/admin/qtx_admin_utils.php on line 209

@herrvigg
Copy link
Collaborator

herrvigg commented Jan 6, 2021

This field should never be missing when you update some translations from the admin side. If it's missing, it means something broke before posting the data. Can you describe the operations to reproduce this?

@herrvigg herrvigg added the need info The submitter must provide more info label Jan 6, 2021
@eliasfaical
Copy link
Author

The error happens in that file /plugins/qtranslate-xt/admin/qtx_admin_utils.php on line 209.
I replace the current qtranxf_getLanguageEdit () function with that.

That worked again!
`
function qtranxf_getLanguageEdit() {
global $q_config;

return isset( $_COOKIE['qtrans_edit_language'] ) ? $_COOKIE['qtrans_edit_language'] : $q_config['language'];
}
`

@herrvigg
Copy link
Collaborator

herrvigg commented Jan 6, 2021

It can't be handled like that, it's not passed in a cookie but in the POST data.

The question is how to reproduce the problem. Can you describe what you were doing to trigger this error?

@eliasfaical
Copy link
Author

I did all the normal procedure, installed the plugin and activated it. But whenever I update some content, it generates this error that I mentioned

@herrvigg
Copy link
Collaborator

herrvigg commented Jan 7, 2021

That sounds very surprising. If you go in settings / languages (qTranslate) / troubleshooting, can you give me the content of versions to list the plugins you are using?

@eliasfaical
Copy link
Author

Follow the information

{
"PHP_VERSION": "7.3.21",
"WP_VERSION": "5.6",
"QTX_VERSION": "3.9.1",
"Plugins": [
"Advanced Custom Fields PRO 5.9.3",
"Classic Editor 1.6",
"Contact Form 7 5.3.2",
"Contact Form CFDB7 1.2.5.3",
"Duplicate Page 4.3",
"qTranslate-XT 3.9.1",
"Importador do WordPress 0.7",
"Yoast SEO 15.5",
"WP Migrate DB 1.0.16"
]
}

@herrvigg
Copy link
Collaborator

herrvigg commented Jan 7, 2021

Do you see errors in the console?
Can you try just once to disable all plugins except qTranslate and Classic Editor?
If this works, then try to enable each plugin one by one and try to save again until you find something. Without more information it's impossible for me to understand what is going on.

@eliasfaical
Copy link
Author

Hello, it took me a while but I did what you asked. I highlighted all the plugins and realized that the conflict was happening with the acf-qtranslate. Thank you for your support

@herrvigg
Copy link
Collaborator

Can you give more details? Please provide all the steps to reproduce the problem.

@herrvigg herrvigg added the module: ACF Integration with ACF label Feb 14, 2021
@herrvigg herrvigg closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: ACF Integration with ACF need info The submitter must provide more info
Projects
None yet
Development

No branches or pull requests

2 participants