WordPress.org

Ready to get started?Download WordPress

Forums

AssetsMinify
[resolved] AssetsMinify activated but not working (12 posts)

  1. jk_
    Member
    Posted 11 months ago #

    Hi there,

    I installed and activated AssetsMinify then I enqueue some style like that :

    function loadStyle() {
        wp_enqueue_style( 'main',  get_template_directory_uri() . '/assets/scss/main.scss' );
    }
    add_action('wp_enqueue_scripts', 'loadStyle');

    However, the scss file is not compiled and I got no error message even with WP_DEBUG set to true.

    Any help would be much appreciated.

    Cheers,

    J.

    http://wordpress.org/extend/plugins/assetsminify/

  2. Alessandro Carbone
    Member
    Plugin Author

    Posted 11 months ago #

    Hi, do you see some error within your error_log file?

  3. jk_
    Member
    Posted 11 months ago #

    The only relevant error that I see in the log is this :

    File does not exist: /var/www/vhosts/jacquesletesson.com/httpdocs/client/bea/wp-admin/client, referer: http://www.jacquesletesson.com/client/bea/wp-admin/options-general.php?page=assets-minify

    In fact, it's because I clicked the button Empty AssetsMinify's Cache

    I even tried with only scripts like that :

    function registerScripts() {
    wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/assets/js/vendor/custom.modernizr.js', array(), '1.0', false );
    wp_enqueue_script( 'responsive-nav', get_template_directory_uri() . '/assets/js/responsive-nav.min.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'responsive-tabs', get_template_directory_uri() . '/assets/js/responsiveTabs.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'tiny-nav', get_template_directory_uri() . '/assets/js/tinynav.min.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'fit-vids', get_template_directory_uri() . '/assets/js/jquery.fitvids.min.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'ss-icons', get_template_directory_uri() . '/assets/webfonts/ss-symbolicons.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'main', get_template_directory_uri() . '/assets/js/main.js', array('jquery-new'), '1.0', true );
    wp_enqueue_script( 'jquery-new', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', array(), '1.0', true );
    }
    add_action( 'wp_enqueue_scripts', 'registerScripts');
  4. jk_
    Member
    Posted 11 months ago #

    The folder uploads is set to 777 and the am_assets folder has been created but nothing inside.

    I deactivated all the plugins that I use but it doesn't change anything.

  5. Alessandro Carbone
    Member
    Plugin Author

    Posted 11 months ago #

    Did you choose the "Use Compass" setting from the admin?

    Are the files enqueued using "registerScripts" included in the page?

    Is the file "/assets/scss/main.scss" included in the page (but it is simply not compiled to css)?

  6. jk_
    Member
    Posted 11 months ago #

    I tried both with and without using compass.

    Yeah the files that I enqueued using registerScripts are included in the page...

    Yes main.scss is included in the page but it's not compiled like it should.

    Thanks for your time and patience.

  7. Alessandro Carbone
    Member
    Plugin Author

    Posted 11 months ago #

    Maybe there's some mistake within main.scss.
    You can try to debug it: remove temporarily blocks of code until it is compiled.
    Let me know

  8. jk_
    Member
    Posted 11 months ago #

    Alessandro,

    Even when I do not enqueue main.scss, the plugin doesn't seem to compile all my JS files as it should.

    So right now, I'm a little bit lost...

    When I click on "Empty AssetsMinify's Cache" I got : http://mysite.com/client/xxx/wp-admin/client/xxxoptions-general.php?page=assets-minify&empty_cache -> Page Not Found.

    I don't understand why the plugin adds client/xxx after wp-admin/

    Cheers,

  9. Alessandro Carbone
    Member
    Plugin Author

    Posted 11 months ago #

    Hi, I've probably found that the issue is due to the subdirectory installation. So I've done some updates to the plugin code.
    You can try the updated version from the plugin's github page

    Download it and try it on your WP installation.
    Let me know if the issue is now resolved.

  10. jk_
    Member
    Posted 11 months ago #

    It works now !

    Thank you for the update.

  11. noaneo
    Member
    Posted 3 months ago #

    hi,

    chmod 777 but is very dangerous, it should not have chmod it is almost an open door for hackers.
    755 not enough?

  12. Alessandro Carbone
    Member
    Plugin Author

    Posted 3 months ago #

    Hi,
    It already depends on your server configuration and users settings on the server.
    WordPress writes the cached files, so if you have set the chmod 755 on uploads and WP can uploads images within this directory, it should also write cached files of AssetsMinify.
    Bye

Reply

You must log in to post.

About this Plugin

About this Topic

Tags