-
Notifications
You must be signed in to change notification settings - Fork 24
Shortcode Bug #85
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
Comments
Hi @YanMetelitsa, thanks for the report - is there any further details you can share with the sites you were testing this on? and any differences between the ones which work and don't i.e. themes/plugins? |
Hi, @pkevan! The sites are practically the same. I dug a bit deeper into the issue and found out:
That's all the information I've managed to find out so far. |
Thanks - I can see it here in the code: https://github.com/WordPress/secure-custom-fields/blob/trunk/secure-custom-fields.php#L172-L175 but don't fully understand if or why or when it should be possible to do this - i'll investigate further. |
Okay, I'll also try to find time to look for the cause of this error in the code. Especially since I've already been contacted several times with this problem, that is, it's quite widespread and, in theory, occurs on any new SCF installation. |
I have a feeling it's probably related to a misplaced text translation string: https://github.com/WordPress/secure-custom-fields/blob/trunk/includes/api/api-template.php#L1043 - looking at https://developer.wordpress.org/reference/functions/shortcode_atts/ it seems like that parameter should be |
I dug a little deeper into the problem and found out:
I think a good idea might be to replace the empty
|
Shows errors when user is logged in, and has appropriate capabilities. Fixes #85.
Greetings!
I noticed, that on some sites the
[acf]
shortcode does not work, while on some sites it works (with the same versions of WordPress and SCF).When trying to output shortcode
[acf field=”..."]
, an empty string is displayed. Everywhere – in page/post content, plugins etc..I checked if the shortcode is registered using $GLOBALS[ 'shortcode_tags' ] – shortcode
[acf]
is registered.At the same time, if you recreate the shortcode, it starts working correctly:
The text was updated successfully, but these errors were encountered: