-
Notifications
You must be signed in to change notification settings - Fork 19
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
When activated, surveyjs plugin loads many js files from /wp-includes/js/dist/ #17
Comments
First of all - how we can reproduce it? And what scripts do you expect to be loaded? |
Looking at this long list I see the only SurveyJS script - "survey.jquery.min.js". Other scripts are neither related by SurveyJS library (excluding jQuery script) nor mentioned in SurveyJS wordpress plugin code. Most likely this question is not related to SurveyJS and should be asked in Wordpress community. |
that's what I meant, something in the surveyjs plugin loads all those scripts even though they're not needed, that shouldn't happen. |
there are a few plugins with the same issue, maybe the gutenberg implementation is to blame? https://wordpress.org/support/topic/plugin-loads-a-lot-of-js-files-in-frontend/ |
I'd like to say that the loaded scripts are not mentioned in the plugin code. I've checked these issue and both of them have no answers. In case of any wordpress option control this bloating scripts loading exists we'll definitely use it in our plugin code. |
ok more hopefully useful links: |
If you are using the source code of SurveyJS Plugin in your Wordpress instance, could you try these approoaches on your side? |
I'm not that kind of developer, but I'll give it a try and keep you posted. I already can tell you that if I remove the gutenberg functionality (since I'm not using the gutenberg editor) with commenting the |
I was wondering why there were so many js files being parsed on my WP site and figured, that if the surveyjs plugin gets activated, all the included js files in the WP dist directory are being loaded. Usually only enqueued scripts should be added, but as soon as surveyjs is activated, all (!) of them are included.
I did a bit of digging and found this post where the last post identifies
register_block_type
as the culprit. I did a quick search and found that the correcteditor_script
is used. Any idea what else might cause that?Best regards,
Matthias
The text was updated successfully, but these errors were encountered: