Hi @lechon,
It looks like the “video embed” plugin has some issue.
It is not displaying the saved data correctly.
Can you please check this with the author of the “video embed” plugin ?
Note: This will happen to any shortcode.
Thanks,
Aakash
Thread Starter
lechon
(@lechon)
Hi @vaakash
it’s not a plugin, that is the name we gave the custom field.
Hi,
Ok.. then this has to be checked with the custom fields plugin.
To eliminate shortcoder as an issue, try entering a random shortcode example [abcd name="hello"] the same issue will happen.
Thanks,
Aakash
Thread Starter
lechon
(@lechon)
Hi @vaakash
We don’t have a custom field plugin.
This is not the case with all of the existing shortcodes we have, they work fine on both Gutenberg and Classic using custom fields.
We really don’t understand why all of the other shortcodes we have work.
Actually your shortcode works on Gutemberg perfectly. It also works with any random sample shortcode like the one you provided on Gutenberg. Screen shot below:
View post on imgur.com
I would completely understand if your shortcode did not work at all in custom fields, but it actually does, it just for some reason it can not keep the full name in classic editor.
This is strange since the particular field does not come from Shortcoder plugin itself and it has nothing to do with it.
Anyways, could you please share a temporary admin creds, (username, password), website URL and in which page this input is present to my contact form ?
https://www.aakashweb.com/contact/
I have no clue on this issue.
A live check will quickly clear the case.
Thanks,
Aakash
Thread Starter
lechon
(@lechon)
Hi @vaakash
Thanks for reaching out to us on this.
Let me check with the client to make sure this is OK.
Regards,
Thread Starter
lechon
(@lechon)
Hi @vaakash
While we were waiting for the client to give us some feedback we discovered how we could make it work.
Like we said before, every shortcode in our library worked except for Shortcoder.
We noticed that all of the working shortcodes that we have, none of them uses ” ” double quotations inside the brackets [ ], unlike Shortcoder where it does, like for example [sc name=”myvideo”].
Removing the double quotes from Shortcoder does the trick, [sc name=myvideo], the code works in custom fields on Classic editor as well in Gutenberg with no issues.
The code also works using only single quotes [sc name=’myvideo’] and even it works when parameters are present in the shortcode like [sc name=’myvideo’ id=’123456′].
So what breaks the generated shortcode from Shortcoder is the double quotes inside a custom field.
With this said, the only way we are able to use Shortcoder is by editing manually the shortcode generated by Shortcoder in “Insert Shortcode to Editor” from double quotes to single quotes or no quotes at all. I guess we are Ok with this, but it’s a shame to loose this feature, as it’s handy.
Our question to you is, Is it OK to use your shorcodes without the double quotes and use single quotes or not quotes at all?
The reason we ask, is that we want to make sure that by doing this we are not opening a security hole somewhere, or futures updates to the plugin does not break the functionality on the shorcodes already embedded.
Regards,
Hi @lechon,
First of all to share more information, the input box “video embed code here” is not created by Shortcoder plugin and I have no clue on what it is or have any control on what is being entered or saved. It looks like if you enter double quote in that text box it is failing to display the text as is. It is because whether it is “custom field” or any other feature it does not matter for Shortcoder. With shortcoder you can enter the code anywhere in any input box.
The reason why I requested for creds is to share with you on what that input field was about since I didn’t get much clarity for my earlier queries.
Regarding the quotes, yes you can use single, double or no quotes at all and it will work as expected as per the syntax suggested by WordPress itself. You can find more details below.
https://codex.wordpress.org/Shortcode_API#Attributes
Hope you got more clarity which could help you get the issue fixed.
Cheers 👍
Thanks,
Aakash
Thread Starter
lechon
(@lechon)
Hi @vaakash
Many thanks for the reply and feedback.
Regards,