WordPress.org

Ready to get started?Download WordPress

Forums

Edit Flow
[resolved] editorial-comments enqueues have URL error (4 posts)

  1. hearvox
    Member
    Posted 2 years ago #

    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:
    http://transom.org/wp/wp-content/plugins/edit-flow/modules/editorial-comments//lib/editorial-comments.js

    But with a single-slash it sends back happiness and flowers:
    http://transom.org/wp/wp-content/plugins/edit-flow/modules/editorial-comments/lib/editorial-comments.js

    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.

  2. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Yeah, my bad. This has already been fixed, actually. Hope to release next week.

  3. Daniel Bachhuber
    Hand Built
    Plugin Author

    Posted 2 years ago #

    Also, you're welcome to make these modifications locally to get you going.

  4. hearvox
    Member
    Posted 2 years ago #

    made the changes locally and we're up & running. thanks for this plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic