WordPress.org

Forums

YOP Poll
[resolved] CSS & JS don't load (14 posts)

  1. carlosfs91
    Member
    Posted 2 years ago #

    Hi,

    I've made my own template for YOP Poll in http://terrassainforma.com and http://sabadellinforma.com, but sometimes the CSS and JS code don't load for no apparent reason. When this happens I see these errors in my Chromium console:

    Failed to load resource https://terrassainforma.com/wp-admin/admin-ajax.php?action=yop_poll_load_css&id=5&location=widget&_wpnonce=4c80fa6004&ver=4.3
    Failed to load resource https://terrassainforma.com/wp-admin/admin-ajax.php?action=yop_poll_load_js&id=5&location=widget&_wpnonce=0a1ff7b70e&ver=4.3

    Any Idea of what may be causing this or how can I fix it?

    http://wordpress.org/plugins/yop-poll/

  2. YOP
    Member
    Plugin Author

    Posted 2 years ago #

    Hi carlosfs91,

    Please try to edit inc/widget.php and where you have
    (is_ssl() ? 'https' : 'http') replace "https" with "http" - so you'll have
    (is_ssl() ? 'http' : 'http')

    Do the same in inc/public-admin.php

    Let us know if you need more help.

    Regards,

    YOP Team

  3. carlosfs91
    Member
    Posted 2 years ago #

    Hi,

    I did it but I get the same errors.
    It's strange because now I realize that this only happens when using Chrome/Chromium. The plugin seems to work fine with Firefox.

  4. carlosfs91
    Member
    Posted 2 years ago #

    UPDATE: Forget what I said about Firefox. It doesn't work in Firefox too.
    I'll let you know if I discover anything else...

  5. YOP
    Member
    Plugin Author

    Posted 2 years ago #

    Hey carlosfs91,

    We did some tests for http://terrassainforma.com/ the js and css is still loading as https and the browsers block it if you don't have a security certificate.

    Please make sure that in inc/widget.php and inc/public-admin.php you replace every "https" with "http" and that you save the changes.

    http://sabadellinforma.com/ seems to be loading properly.

    Best wishes,

    YOP Team

  6. carlosfs91
    Member
    Posted 2 years ago #

    I replaced every "https" with "http" in both files when you told me for the first time. I've checked it again, and there's not a single "https" anymore.

    I don't know why the js and css still load as https. Perhaps I should change "https" to "http" in somewhere else...

    What do you think?

  7. YOP
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Please run a search in widget.php, public-admin.php and admin.php for
    (is_ssl() ? 'https' : 'http') and replace it with 'http'

    Do this for both websites and save.

    Regards,

    YOP Team

  8. carlosfs91
    Member
    Posted 2 years ago #

    I'm using WordPress multisite (if this matters, sorry for not saying it at the beginning), so when I change it for one site, I change it for both. I replaced (is_ssl() ? 'https' : 'http') with 'http' in widget.php and public-admin.php, but still loads as https in terrassainforma.com and it works fine for the sabadellinforma.com.

  9. YOP
    Member
    Plugin Author

    Posted 2 years ago #

    Hi carlosfs91,

    Did you install it separately for each site or did you do a network install?

    We would recommend create a backup for your template, uninstall the plugin from both sites, then download YOP Poll, make the changes and install it again.

    Best wishes,

    YOP Team

  10. carlosfs91
    Member
    Posted 2 years ago #

    Ok, did it. Downloaded, unzipped, replaced (is_ssl() ? 'https' : 'http') with 'http' in widget.php and public-admin.php, zipped, and network installed.
    Still loads as https, and now it doesn't work in any site. The other templates do not load either, and I get the same errors.

  11. carlosfs91
    Member
    Posted 2 years ago #

    Update:
    When removing
    define( 'FORCE_SSL_LOGIN', true );
    define( 'FORCE_SSL_ADMIN', true );
    from wp-config.php, the plugin works fine with the changes, but I'd like to leave those lines there because I want the authors and editors of this pages to login using SSL automatically, without having to enter the "https://" manually before the url each time they want to login. So I'm just telling this because there must some sort of conflict with your plugin and Forcing SSL in the login and admin page.

    The SSL certificate is self-generated, because I only use https for the authors ans Editors of the blog.

  12. carlosfs91
    Member
    Posted 2 years ago #

    So... Any Idea on how to solve this?

  13. YOP
    Member
    Plugin Author

    Posted 2 years ago #

    Hi carlosfs91,

    Instead of network install, please try to install the plugin with the necessary changes separately for each of your websites.

    Regards,

    YOP Team

  14. carlosfs91
    Member
    Posted 2 years ago #

    I've tried this:

    1. Installed the plugin in network admin as usual for multisite.
    2. Didn't activate the plugin for whole network.
    3. Went to admin of individual site and tried to enable plugin there for that site alone. But I couldn't, because YOP Poll doesn't appear in the list, although I can activate other disabled plugins...

    How do you suggest installing this plugin separately for each site?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic