Skip Navigation

[Resuelto] Post Edit Form in Expert Mode causing unexpected issues with cred_i18n Label…

This support ticket is created hace 4 años. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Este tema contiene 12 respuestas, tiene 2 mensajes.

Última actualización por shawnW-3 hace 3 años, 10 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#1849201
toolset-credi18n.PNG

I am trying to:
Build a custom edit form so I can make product editing multi-stage.

Link to a page where the issue can be seen:
Site is private and in development.

I expected to see:
Fully rendered field labels.

Instead, I got:
See image attached.
And - https://toolset.com/forums/topic/new-shortcode-in-cred-forms/

Things to note: All plugins, theme and WP are all up-to-date and all custom javascript has been removed. No user messages, no errors, no warnings, no info, no verbose showing dev console.

When I switch to expert mode my fields look like this...

<div class="form-group">
<label>[cred_i18n name='operating-voltage-label'][cred_i18n name='operating-voltage-label'][cred_field name='operating-voltage-label']Operating Voltage[/cred_field][/cred_i18n][/cred_i18n]</label>
[cred_field field='operating-voltage' force_type='field' class='form-control' output='bootstrap']
</div>

Since there is double [cred_i18n name='operating-voltage-label'][/cred_i18n] - I removed one set and now I get nothing for that label.

So I remove both sets, leaving only <label>[cred_field name='operating-voltage-label']Operating Voltage[/cred_field]</label>
And again, no result.

So I remove everything but the label tags and inner text <label>Operating Voltage</label>
There Operating Voltage text doesn't appear and the input is now gone.

There's probably more I could test, but I'd like it to work as intended. Drag and drop works fine, but I'm really wanting to use UIKit and a bit of jquery for the multi-stage processing. The form is going to be an absolute beast, so some form of multi-stage processing is necessary. My original plan was to make multiple edit forms and go from one to the next with each submission, in which case I wouldn't feel compelled to use expert mode, but they wouldn't play nice embedded in the same content template.

#1849445

Hello,

I have tried it in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine, after switch to expert mode, I see only one [cred_i18n] shortcode within HTML label tag, for example:

	<div class="form-group">
		<label>[cred_i18n name='operating-voltage-label']operating-voltage[/cred_i18n]</label>
		[cred_field field='operating-voltage' force_type='field' class='form-control' output='bootstrap']
	</div>

And it works fine in front-end too

So the problem you mentioned above is abnormal, please check these:

1) In case it is a compatibility problem, please deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again

2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

3) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and form URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1851191
twenty-twenty-live-preview.PNG
php-notices.png
outputs-yoo.PNG
js-console.PNG

The theme and plugins are up-to-date, we removed all custom JS, any embedded media, and iframes.

The dev console is showing no errors (See Image). We turned on PHP error reporting and the only notices shown were ob_end_flush(): failed to send buffer zlib output compression (See Image). If this is the issue, I'd be very interested to know specifics. In the meantime I just ran the fix described here: enlace oculto

We used a live preview of the Twenty-Twenty theme and as you can see in the image, got the same result.

We shut off almost every plugin, certainly any Non-Toolset plugin that could be related to this page. If I need to test disabling certain Toolset plugins, I'd like to know specifically which ones.

Before we grant access, please review the images attached and and a few of the code scenarios laid out below in case something sticks out.

See Output Yoo image for reference on each number.

ONE:
What we got when we removed all field tags surrounding label -
Does Not Output Anything, not even the HTML tags
<div class="form-group">
<label>Operating Voltage</label>
[cred_field field='operating-voltage' force_type='field' class='form-control' output='bootstrap']
</div>

TWO:
What we got when we removed the extra set of cred_i18n -
Outputs the Input Only, Nothing for the Label
<div class="form-group">
<label>[cred_i18n name='max-current-draw-amps-label'][cred_field name='max-current-draw-amps-label']Max Current Draw Amperage[/cred_field][/cred_i18n]</label>
[cred_field field='max-current-draw-amps' force_type='field' class='form-control' output='bootstrap']
</div>

THREE:
What we got when we switched to Expert Mode -
Outputs the Input and "[/cred_i18n]"
<div class="form-group">
<label>[cred_i18n name='rca-input-voltage-sens-label'][cred_i18n name='rca-input-voltage-sens-label'][cred_field name='rca-input-voltage-sens-label']RCA Input Voltage Sensitivity[/cred_field][/cred_i18n][/cred_i18n]</label>
[cred_field field='rca-input-voltage-sens' force_type='field' class='form-control' output='bootstrap']
</div>

And just to reiterate, I'm not the only person currently having issues related to this new tag...
https://toolset.com/forums/topic/new-shortcode-in-cred-forms/

#1853045

As the thread you mentioned above, we can not duplicate the same problem in a fresh WP installation, please provide your website database dump file, private message box enabled again. Thanks

#1854327

Thanks for the details, I am downloading the files, will update here if find anything

#1854365

I can see the problem with your duplicator package and have been able to reproduce the same problem in my localhost.

Escalated this issue, will update here if there is any news.

Currently, you can remove those extra [cred_i18n] shortcodes manually.

#1855353

Thank you. Regarding manual removal of cred_i18n tags, please my "One, Two, Three" example above for what happens when I remove them.

#1856003

Which problem form are we talking about? please point out the form URL?

You just need to wrap the label text into [cred_i18n] shortcode, for example:
One:

<div class="form-group">
<label>[cred_i18n name='operating-voltage-label']Operating Voltage[/cred_i18n]</label>
[cred_field field='operating-voltage' force_type='field' class='form-control' output='bootstrap']
</div>

Two:

<div class="form-group">
<label>[cred_i18n name='max-current-draw-amps-label']Max Current Draw Amperage[/cred_i18n]</label>
[cred_field field='max-current-draw-amps' force_type='field' class='form-control' output='bootstrap']
</div>

Three:

<div class="form-group">
<label>[cred_i18n name='rca-input-voltage-sens-label']RCA Input Voltage Sensitivity[/cred_i18n]</label>
[cred_field field='rca-input-voltage-sens' force_type='field' class='form-control' output='bootstrap']
</div>
#1861933

If you look under M1d on the menu you will see the form at the bottom. None of those examples worked in the form I had.

So, I built a new form and it worked. In this new form I switched to expert mode before saving, and the tagging was correct. I switched back to visual editor and that is when it added the second set of cred_i18n tags and the form became irreparable.

In fact, anytime you switch from visual to expert and back again it adds an additional set of cred_i18n tags, and removing those tags doesn't fix the issue.

On the plus side, I know how to make a form that will work from the get go - so long as I know from the beginning that I want expert mode. That said, you definitely have a bug that shows up somewhere when switching from expert mode to visual.

#1862131

Yes, it has been escalated to our developers as a bug, I will update here if there is any news.

#1875183

Here is update: this issue is fixed in next version of Toolset Forms plugin 2.6.5, which is under QA status, will be released soon.

#1893503

Hello,

It is fixed in the latest version of Toolset Forms plugin, you can download it here:
https://toolset.com/account/downloads/

Please test it and feedback if the problem is fixed, thanks

#1906873

I can confirm the update fixed this issue. Thank you.