Support » Plugin: Edit Flow » [Plugin: Edit Flow] editorial-comments enqueues have URL error

  • Was testing your plug and, on one site, the Editorial Comments “Respond to this Post” button wasn’t opening the comment form. I think the prob is en extra slash in the editorial-comments.php enqueues.

    Noticed neither the editorial-comments.js nor the editorial-comments.css were loading, tho both were called in the HTML. Clicked in View Source on the script-src and link-href URLS and got a 403s for both, while all the other edit-flow includes were loading fine.

    Then noticed in your editorial-comments URLs has 2 slashes before “lib/...“:

    <link..  href='.../wp-content/plugins/edit-flow/modules/editorial-comments//lib/editorial-comments.css?ver=0.7.1' ...
    <script ... src='.../wp-content/plugins/edit-flow/modules/editorial-comments//lib/editorial-comments.js?ver=0.7.1' ...

    The other edit-flow URLs did not:
    <script ... src='.../wp-content/plugins/edit-flow/modules/custom-status/lib/custom-status.js?ver=0.7.1' ...

    Seems, while some servers are fine w/ the extra slash, our webhost get all grouchy and 403 Forbidden:

    But with a single-slash it sends back happiness and flowers:

    So found the enqueues in your: /editorial-comments/editorial-comments.php:

    wp_enqueue_script( 'edit_flow-post_comment', $this->module->module_url . '/lib/editorial-comments.js', array( 'jquery','post' ), EDIT_FLOW_VERSION, true );
    wp_enqueue_style( 'edit-flow-editorial-comments-css', $this->module->module_url . '/lib/editorial-comments.css', false, EDIT_FLOW_VERSION, 'all' );

    When I edited your file to lose those leading /lib/ slashes (e.g.: $this->module->module_url . 'lib/editorial-comments.js), the Editorial Comments form made its glorious return (and the URLs were /lib/). When I added the pre-lib slashes back, I was once again formless.

    Guessing your $this->module->module_url already comes equipped w/ it’s own trailing slash, so the URL needs not a leading one.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Edit Flow] editorial-comments enqueues have URL error’ is closed to new replies.