[resolved] wp-less fails under https (6 posts)

  1. Marco
    Posted 4 years ago #

    When I use WP-Less over ssl it fails to find the source file and kills execution. Stacktrace when WP_DEBUG is set:

    Warning: filemtime(): stat failed for /home/demo.localhost/public_html/_/wp-contenthttps://kiosk.demo.localhost/wp-content/themes/mni-stack2/style.less in /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/Stylesheet.class.php on line 96

    Fatal error: Uncaught exception 'Exception' with message 'load error: failed to find /home/demo.localhost/public_html/_/wp-contenthttps://kiosk.demo.localhost/wp-content/themes/mni-stack2/style.less' in /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/vendor/lessphp/lessc.inc.php:1927
    Stack trace:
    #0 /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/Compiler.class.php(24): lessc->__construct('/home/demo.localhost/pub...')
    #1 /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/Plugin.class.php(122): WPLessCompiler->__construct('/home/demo.localhost/pub...')
    #2 /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/Plugin.class.php(161): WPLessPlugin->processStylesheet('less', false)
    #3 [internal function]: WPLessPlugin->processStylesheets('')
    #4 /home/demo.localhost/public_html/_/wp-includes/plugin.php(403): call_user_func_array(Array, Array)
    #5 /home/demo.localhost/public_html/_/wp-includes/functions.wp-styles.php(25): do_action('wp_print_styles')
    #6 [internal function]: wp_print_styles('')
    #7 /home/demo.localhost/public_html/_/wp-includes/plugin.php(403): call_ in /home/demo.localhost/public_html/_/wp-content/plugins/wp-less/lib/vendor/lessphp/lessc.inc.php on line 1927

    Most likely either WP or WP-Less assumes protocol to be http only...


  2. Marco
    Posted 4 years ago #

    The fix: In lib/Stylesheet.class.php, line 91, replace WP_CONTENT_URL with content_url()

  3. coolgates
    Posted 4 years ago #

    Ran into this issue, too. Fix worked as described. Any reason why this shouldn't be included as an update to the plugin?

  4. oncletom
    Plugin Author

    Posted 3 years ago #

    Thanks for the report. I'm publishing an update of the plugin within the day.

    Sorry for the delay, seriously.

  5. oncletom
    Plugin Author

    Posted 3 years ago #

    The problem is addressed here: https://github.com/oncletom/wp-less/issues/8

    I already run my blog over SSL and I did not encounter any problem with SSL.
    So maybe you are using it a way I did not expected.

  6. oncletom
    Plugin Author

    Posted 3 years ago #

    And the fix included in 1.5.2. I've missed the PR.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic