Minify JS issues
-
My Theme customization is broken after enabling Minify JS files.
Looks like your minifier modifies the code in areas with an extra “( )” causing the fault,
Please prevent it from adding it to the codes.
-
Hey there @dmitryto,
You can use the Exclude functionality to exclude your themes js from being minified.
Go to Frontend Optimization Tab, navigate to Minify JavaScript Files, and when the optimization is enabled, click on Exclude from JavaScript Minification.
This will skip the modification of those files.
Kind regards,
StoyanHi @stoyangeorgiev,
For sure, this could be used as a temporary patch.
I would like to mention that I’ve tried several other plugins and none of them gave me such issue. I’m certain that the source of it is within the way this plugin executes the minification.
Although it’s only me posting it here, I’m aware of more users like me that rely on SG Services with one of the popular themes combination who experience the same issue.
Please take it into account and review what causes it,
I might be able to forward technical info if requested.Thanks,
DmitryUpdate:
I’ve tried the suggested solution of excluding my theme js from being minified,
It did not resolve anything.In fact, there are error codes even at the dashboard.
m https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:306 h https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:306 h https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:282 d https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 d https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 x https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:16 default https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:16 promise callback*t.default/</< https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:16 promise callback*t.default/< https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:16 h https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:282 d https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 persist https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 default https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:323 n https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:1 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:282 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:282 n https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:1 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:282 n https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:1 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:1 <anonymous> https://-----.com/wp-content/plugins/sg-cachepress/assets/js/optimizer.bundle.js?ver=5.7.20:1
Hey there @dmitryto,
The console errors you have posted are not interfiering with the work of the plugin in any way.
Could you please provide a site URL so we can check the issue. Also, could you provide a specific code block where the extra “()” are being added?
Kind regards,
StoyanIf there’s a way to contact you in private , I can generate a temporary login if you would like to access the customize area and see the issue first hand.
At this point, I would like to keep my website away from public.
Here’s a screenshot that has the error I had related to as “()”.
This list of errors occur only when the minify JS is turned on. (aside of an jpg 404 one)
Whited out areas are the web + theme names.
https://ibb.co/8cnq9FcI can generate a temporary login if you would like to access the customize are
@dmitryto Please do not offer that access. If @stoyangeorgiev did accept that offer, either here or off forums then I would feel bad if they were banned and had their plugins on this site removed as a result.
Yes, this is that serious.
Had @stoyangeorgiev made that offer (he did not make that offer, I am just explaining) then this would be my reply:
While I know you have the best of intentions, it’s forum policy that you not ask users for admin or server access. Users on the forums aren’t your customers, they’re your open source collaborators, and requesting that kind of access can put you and them at high risk.
If they are paying customers (such as people who bought a premium service/product from you) then by all means, direct them to your official customer support system. But in all other cases, you need to help them here on the forums.
Thankfully are other ways to get information you need:
- Ask the user to install the Health Check plugin and get the data that way.
- Ask for a link to the http://pastebin.com/ or https://gist.github.com log of the user’s web server error log.
- Ask the user to create and post a link to their
phpinfo();
output. - Walk the user through enabling WP_DEBUG and how to log that output to a file and how to share that file.
- Walk the user through basic troubleshooting steps such and disabling all other plugins, clear their cache and cookies and try again (the Health Check plugin can do this without impacting any site vistors).
- Ask the user for the step-by-step directions on how they can reproduce the problem.
You get the idea.
We know volunteer support is not easy, and this guideline can feel needlessly restrictive. It’s actually there to protect you as much as end users. Should their site be hacked or have any issues after you accessed it, you could be held legally liable for damages. In addition, it’s difficult for end users to know the difference between helpful developers and people with malicious intentions. Because of that, we rely on plugin developers and long-standing volunteers (like you) to help us and uphold this particular guideline.
When you help users here and in public, you also help the next person with the same problem. They’ll be able to read the debugging and solution and educate themselves. That’s how we get the next generation of developers.
Marking as resolved due to no reply.
- The topic ‘Minify JS issues’ is closed to new replies.