Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tim W

    (@timwhitlock)

    I didn’t know about this restriction. Thanks for letting me know. The next version won’t use glob at all, but I can’t do anything about this bug in the current version.

    Thread Starter Grzegorz Sarzy?ski

    (@grzecho)

    Ok, thanks.

    The error is caused by long paths in node_modules directory. I use node.js/gulp to compress js and css files. Maybe in next version you could prevent from scanning folders like “node_modules” or “bower_components”, or other folders found in .gitignore file.

    Plugin Author Tim W

    (@timwhitlock)

    I intend to have much more powerful configs for file locations. Adding these as default exclusions is a good idea. Thanks for the suggestion.

    Hy Tim,
    Thanks for the plugin!. Sadly i have the same problem. Any idea how long your update will take you?

    thanks!

    Plugin Author Tim W

    (@timwhitlock)

    It’s more than an update, it’s a complete ground-up rebuild. I’m working on it now, but cannot provide a launch date.

    By the way the current development version no longer uses glob. You’re welcome to try that and see if it solves your problem.

    Amid

    (@aminteractiondesign)

    really annoying problem, here′s a quick fix:

    in loco-admin.php, find this function and replace it with this version:

    private static function find_recursive( $dir, $pattern, $options, array $found ){
            // collect files in this directory level
            $found = self::find_grouped( $dir.$pattern, GLOB_NOSORT|$options, $found );
            // recurse to subdirectories
            $sub = glob( $dir.'/*', GLOB_ONLYDIR|GLOB_NOSORT );
            if( is_array($sub) ){
                foreach( $sub as $dir ){
                    if (stripos($dir, 'node_modules') === false) {
                        $found = self::find_recursive( $dir, $pattern, $options, $found );
                    }
                }
            }
            return $found;
        }
    Plugin Author Tim W

    (@timwhitlock)

    For the record: The next major version (2.0 in development) allows full configuration over directories to be searched so you will be able to exclude “node_modules” and whatever else you need. I won’t be hard-coding any directory names into the core functions of the 1.x version, but I could feasibly add WordPress hooks.

    Note also that the above-linked development version no longer uses glob. When this is released as 1.5.6 the above patch will no longer work.

    Plugin Author Tim W

    (@timwhitlock)

    Marking as resolved, because globbing is no longer used.

    The final 1.x release no longer uses glob.

    The 2.0 branch is in beta and will allow you to block the node_modules path: https://localise.biz/help/wordpress/translate-plugin/developers

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Plugin throws lots of warings: glob(): Pattern exceeds the maximum …’ is closed to new replies.