WP-Optimize: Why is processed JS file NOT minified?
-
Why are all the following JS files minified EXCEPT for one:
Same issue on a different page of same website – https://mitchellwreathrings.com/wreath-machine-instructions/
The page I need help with: [log in to see the link]
-
Hi,
The min.js at the end of the file name shows that it is: https://snipboard.io/aWjKdM.jpg
Even if your JavaScript is minified, Web Inspector pretty-prints—or expands—all of your scripts, allowing you to set breakpoints on minified content.
Try visiting the URL for the script, you will see that it is minified.
Actually, the Preview shows “-” for line numbers of minified lines that are wrapped by the pretty-printing. When it shows actual line numbers, these correspond to the real line numbers in the retrieved source file. So for the particular files I screen-shotted above, you can see that they have not been minified.
Compare to minified files, which look like this:
If you click this: https://snipboard.io/fkJKDM.jpg (it’s right under this section of code in your screenshot)
Does the file change at all?
Can you provide the URL of the script?
Example unminified JS file: https://mitchellwreathrings.com/wp-content/cache/wpo-minify/1743024104/assets/wpo-minify-footer-authorize_net_chosen_jquery_scripts1739650444.min.js
This is after formatting with the “{}” button, which is on by default:
Here is the beginning of the corresponding un-minified, actual source file – I compared the first 80 lines of each, and they appear to be identical, meaning no minification was done on this file, even though it was processed by WP-Optimize (see the file name above):
/*!
Chosen, a Select Box Enhancer for jQuery and Prototype
by Patrick Filler for Harvest, http://getharvest.com
Version 1.1.0
Full source at https://github.com/harvesthq/chosen
Copyright (c) 2011 Harvest http://getharvest.com
MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
This file is generated bygrunt build
, do not edit it by hand.
*/
jQuery(function() {
jQuery('.chosen-select').chosen();
jQuery('.chosen-select-deselect').chosen({ allow_single_deselect: true });
});
(function() {
var $, AbstractChosen, Chosen, SelectParser, _ref,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
SelectParser = (function() {
function SelectParser() {
this.options_index = 0;
this.parsed = [];
}
SelectParser.prototype.add_node = function(child) {
if (child.nodeName.toUpperCase() === "OPTGROUP") {
return this.add_group(child);
} else {
return this.add_option(child);
}
};
SelectParser.prototype.add_group = function(group) {
var group_position, option, _i, _len, _ref, _results;
group_position = this.parsed.length;
this.parsed.push({
array_index: group_position,
group: true,
label: this.escapeExpression(group.label),
title: group.title ? group.title : void 0,
children: 0,
disabled: group.disabled,
classes: group.className
});
_ref = group.childNodes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
option = _ref[_i];
_results.push(this.add_option(option, group_position, group.disabled));
}
return _results;
};
SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
if (option.nodeName.toUpperCase() === "OPTION") {
if (option.text !== "") {
if (group_position != null) {
this.parsed[group_position].children += 1;
}
this.parsed.push({
array_index: this.parsed.length,
options_index: this.options_index,
value: option.value,
text: option.text,
html: option.innerHTML,
title: option.title ? option.title : void 0,
selected: option.selected,
disabled: group_disabled === true ? group_disabled : option.disabled,
group_array_index: group_position,
group_label: group_position != null ? this.parsed[group_position].label : null,
classes: option.className,
style: option.style.cssText
});
} else {
this.parsed.push({
array_index: this.parsed.length,Is it this plugin: https://plugins.jquery.com/chosen/
I am just trying to replicate your issue.
I am not sure how to tell which is the source plugin for this js file – probably one of these:
$ find wp-content/plugins/ -name \*chosen\*js
wp-content/plugins/publishpress/common/libs/chosen-v1.8.3/chosen.proto.min.js
wp-content/plugins/publishpress/common/libs/chosen-v1.8.3/chosen.proto.js
wp-content/plugins/publishpress/common/libs/chosen-v1.8.3/chosen.jquery.js
wp-content/plugins/publishpress/common/libs/chosen-v1.8.3/chosen.jquery.min.js
wp-content/plugins/wp-geoip-redirect/assets/resources/chosen.jquery.min.js
wp-content/plugins/themify-ptb-submissions/admin/js/chosen.jquery.min.js
wp-content/plugins/eh-authorize-net/assets/js/chosen.js
wp-content/plugins/eh-authorize-net/assets/js/chosen.jquery.js
wp-content/plugins/wp-all-import-pro/static/js/jquery/chosen.jquery.js
wp-content/plugins/wp-all-import-pro/static/js/jquery/chosen.jquery.min.jsApologies for the delay over the weekend.
Can you list your plugins, I just need to find the plugin that has this file in it.
@vupdraft
Is there a non-public way for me to send you sensitive info?Hi @rashamatt!
Please use the contact form on our website. Make sure to make reference to this support topic.It looks like you have a plugin named EH Authorize.net installed. Please provide the link download link to this plugin.
Is this plugin by any chance a very old plugin that is no longer being maintained?
Hi @deabiodun
This is a paid plugin: https://elextensions.com/plugin/authorize-net-payment-gateway-for-woocommerce/
Please provide your email for some way for me to securely send you the plugin zip –
(see my previous message via your Contact form for my own email)You can upload the file to google drive and send the link via our contact form.
- You must be logged in to reply to this topic.