-
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
ACF Post Object [qTranslate-XT] does not work #1320
Comments
I confirm there's a bug, I can reproduce it. The standard ACF Post Object is working, without translation. |
Indeed there's a regression in 3.14.0. Now fixed in master. You can also copy the 4 lines of code shown in the patch above: #2e8e453. |
thanks, ACF Post Object [qTranslate-XT] is working now but I'm getting errors similar to the following after your latest release. |
What is following "must be of type string, ..."? |
Yes, i'm using Yoast(wp-seo) and i think this function is used wrongly by a hook in the Yoast module. Same problem on qtranxf_wpseo_webpage_schema( array $piece, string $context ) function. $context atgument is return "undefined"and getting this error. I'm getting no error when I remove this arguments from functions. |
The main purpose is to filter `redirect_canonical` (WP hook). The WP documentation is not precise regarding the types so we have to relax the types check. Check first if the redirect URL is false. The second parameter is the requested URL but it is ignored. See #1320, wrong usage with Yoast. The second parameter has a different meaning with Yoast. Removing the types will work but the Yoast hook should be rewritten with a different function. Rewrite the function to handle the default language in convertURL.
See also #1320. It is too risky to specify these types for now.
Yes, the Yoast hooks are ill-defined. The second parameter in Yoast is Strong type checks with PHP is the way to go because it helps to find such wrong usage. The drawback is that is it can create regressions. It's unfortunate the WP documentation is not accurate and their APIs are so messy with many mixed types often undocumented. I will comment more in #1314 and possibly do other reverts. |
Released fix for ACF Post Object in 3.14.1. |
ACF Post Object [qTranslate-XT] field always getting 400 Bad Request. I can't get any post objects.
I checked ACF's native Post Object field but it's working.
ACF Pro 6.1.3
qTranslate-XT 3.14.0
The text was updated successfully, but these errors were encountered: