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

LitEmoji causing timeouts over ajax submissions #2048

Open
jhealey5 opened this issue Sep 2, 2024 · 4 comments
Open

LitEmoji causing timeouts over ajax submissions #2048

jhealey5 opened this issue Sep 2, 2024 · 4 comments

Comments

@jhealey5
Copy link

jhealey5 commented Sep 2, 2024

Describe the bug

We have a front-end form with an autopilot integration which, after updating to 3.15+ causes timeouts and subsequently fails to submit the form when using client-side ajax submissions.

I've tracked it down to the LitEmoji helper on line 409 of src/base/Integration.php

$settings = Json::decode(LitEmoji::shortcodeToUnicode(Json::encode($settings)));

Removing the LitEmoji::shortcodeToUnicode method prevents the timeout occurring.

Is there some way to disable this or otherwise fix it? We can't upgrade this client to Craft 4/5 just yet.

Steps to reproduce

Not sure if this can be easily re-created, may depend on several factors including server.

Form settings

  • Multi-page form: No
  • Submission Method: Ajax
  • Client-side Validation: Yes
  • Custom Form Templates: No

Craft CMS version

Craft Pro 3.9.13

Plugin version

1.6.45

Multi-site?

No

Additional context

No response

@engram-design engram-design changed the title [3x] LitEmoji causing timeouts over ajax submissions LitEmoji causing timeouts over ajax submissions Sep 2, 2024
@jhealey5
Copy link
Author

Any movement suggestions here?

@engram-design
Copy link
Member

Formie 1 support has wrapped up so I'm hesitant to make this potentially breaking change by just removing the LitEmoji::shortcodeToUnicode method call.

It's not something I can replicate though, and I have a bunch of integrations enabled for testing purposes. It could be something unique with your Autopilot integration.

I don't suppose you could alter that line to:

Craft::dd(Json::encode($settings));

And send through the resulting JSON string, so I can test what you see? Feel free to send to [email protected] if you'd rather keep it private.

@jhealey5
Copy link
Author

Hey @engram-design Thanks, I've just emailed that to you.

Appears it might be down to the size of that json - I suspect 12mb of settings is too much and so the server times out?

@engram-design
Copy link
Member

Thanks for sending that through, and you're right - that's likely the real issue here. Looking through your data, it seems like you've both got a lot of lists, and a lot of fields on each of those lists. Formie is going to be saving all those in the database as a reference, so we'll probably need to do our processing later, and just for the list data you've picked.

I'll have to play around with some options on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants