Forum Replies Created

Viewing 15 replies - 1 through 15 (of 56 total)
  • Plugin Author mneil

    (@mneil)

    Thanks! I’ll have to test with this before I can roll it into a fix. I’m sorry it’s taken me a while to get back on support. I appreciate the feedback and the example code!

    Plugin Author mneil

    (@mneil)

    That would make me think one of your files being included somewhere with enqueue_styles is incorrect. I’m stripping out the url of your site from the file path to get the filename and that error is telling me the filename is empty. For that to happen you’d have to be enqueu’ing a style that doesn’t have a real filename.

    You can patch it by changing line 995 to

    //if( strstr( $css, $use ) )
    //if( !empty($use) && strstr( $css, $use ) )

    But again I don’t think the root cause of the issue is my plugin. It would be worth the effort to make sure that no styles are being included incorrectly on your site.

    Plugin Author mneil

    (@mneil)

    I added those comments in to help debug should anyone have issues getting scripts to combine. I’m not sure how knowing the tags used to combine the files poses a security risk. However, if you wanted to remove them you could by modifying the plugin. I’m not sure if I would add this as an option or not. I think there are already just enough options to be confusing :).

    Modify class-plugin-mncombine.php
    replace lines 1048 and 1049 with this

    //$implode = array_keys( (array)$data );
    //$implode = implode( ", ", $implode );
    $implode = "";

    And replace line 1065 with

    //file_put_contents( $path, "/*$key*/\n$content\n\n", FILE_APPEND | LOCK_EX );
    file_put_contents( $path, "\n$content\n\n", FILE_APPEND | LOCK_EX );

    That should do it for the CSS.

    Plugin Author mneil

    (@mneil)

    Sorry for the delay on my responses.

    Not all CSS is valid in the body. CSS is most likely going to be used in the head and would not be valid if I just linked to it in the footer. It’s only valid in the body with HTML5 in certain circumstances as far as I understand it. Placing it in the body or doing it asynchronously may also cause the FOUC that would probably confuse more people than it helped. I don’t intend to move any CSS to the footer or load it asynchronously.

    I have also commented a couple other times on my thoughts about Google Page Speeds worthiness. It’s definitely helpful. But not everything it says is always 100% applicable to your particular site.

    Plugin Author mneil

    (@mneil)

    Hmm, thanks for reporting this issue. Can you let me know what the original CCS is before it’s modified. For example:

    background: url(https://mydomain.com/test.jpg);

    The plugin physically moves the css files into a new location and in order to avoid moving all images relative to the new css it makes more sense for me to try and update the path to create an absolute URL to the assets. There must be an issue in the regex for some edge case where it’s converting an absolute URL.

    Thanks again!

    Plugin Author mneil

    (@mneil)

    50 plugins is a lot :). Honestly, if all the javascript files you have in all the plugins are written well they should not break when they’re all combined. The plugin makes sure that any dependency file is loaded before the file requiring it. But, obviously sometimes plugins will contain JS files that just don’t play well with others.

    The way I debug what isn’t working when I do combine them all is to look at the javascript console in the browser and determine which file broke. The console will give you a line number and you can click to view the source. From there you can usually determine which file broke based on what code is executing. Then, I pull that file out from being combined. In a production environment I’d honestly just fix whatever the issue is in the javascript file that’s causing the breakage. But, trying to do that and maintain 50 plugins and update them is probably too much.

    Minifying the javascript is a different aspect. Sometimes even decently written javascript will break when minified. In a perfect world, it wouldn’t, but sometimes small syntax mis-uses make it into plugins and they break the minification. When you’re combining them all are you also using the “minify” options? And, what minification method are you using? Closure, or JSMin?

    As far as load times they are only slow on the first request for the first visitor. Once those files are cached for 1 user they are cached for all. The rebuild process doesn’t happen for individual users. Instead, the files are combined and stored on the server and served as needed.

    Unfortunately there is no silver bullet to your issue. The “trial and error” method is kind of it. Using the console though can save you a lot of “error” so you’ll at least be able to get the “trial” part done sooner!

    Hopefully that helps.

    Thanks!

    Plugin Author mneil

    (@mneil)

    Update: I just deployed an updated version showing compatibility with 4.1. It also includes a bug fix that some users were experiencing. Thanks!

    Forum: Plugins
    In reply to: [MnCombine] empty needle
    Plugin Author mneil

    (@mneil)

    This issue should be fixed with the latest release 1.1.5. I guess I already had a patch for this known issue a while ago and forgot to release it. I’ve also tested and updated the compatible wp version to 4.1. Thanks!

    Plugin Author mneil

    (@mneil)

    I am maintaining it but honestly nothing has changed in the WP core that affects the plugins functionality. I’ve pondered doing a superficial update just so people see it’s current and works. Another problem I’m battling is WP’s constant release cycle. It seems it’s always major.minor.0, followed less than week by major.minor.patch with 1 or two patches. It takes time just to push these version increments that do nothing but show users it works for the latest version. I do test it with each new release of WP. Now that a whole new year has hit though I probably should push a change :). Thanks!

    Forum: Plugins
    In reply to: [MnCombine] empty needle
    Plugin Author mneil

    (@mneil)

    Hmm odd, thanks for reporting. I’ll take a look and let you know what I find.

    Plugin Author mneil

    (@mneil)

    I’m marking this as resolved since I haven’t heard back. Let me know if you have any updates. Thanks!

    Plugin Author mneil

    (@mneil)

    I’m marking this as resolved since I haven’t heard back. Let me know if you have any updates. Thanks!

    Forum: Plugins
    In reply to: [MnCombine] Not working
    Plugin Author mneil

    (@mneil)

    I’m marking this as resolved since I haven’t heard back.

    Plugin Author mneil

    (@mneil)

    Sorry, it’s not compatible with multi-site installs. This plugin traverses the directory structure of the WP install to find files to combine and I haven’t had the time to make it recognize the different sites on a MU install. If it did somehow show up on a MU install it wouldn’t work as expected. Thanks for trying it out though!

    Forum: Plugins
    In reply to: [MnCombine] Not working
    Plugin Author mneil

    (@mneil)

    I have a couple ideas. First, if the css file you selected imports any other files or has a dependency on other css then it will load them. Dashicons have been breaking this plugin because of the svg string in the css and unfortunately I can’t fix that issue. The only way to get around it is to not include that css or any css that requires the dashicon set.

    For the javascript it should be generating something. Which minification method are you using? Closure is the default but maybe try switching to jsmin. Closure does a better job but it has limits on the amount of scripts it will minify. JSmin will always work.

Viewing 15 replies - 1 through 15 (of 56 total)