Support » Plugin: WordPress Popular Posts » Broken after update

  • Resolved agbuere

    (@agbuere)


    Received an automatic update for WordPress Popular Posts today 7/8/22 version 6.0.1. Plugin seems to be broken now. There is still a list of the most-read items on my website but if I go to the settings page whatever I click I only see a revolving grey circle (probably meaning something like “wait, processing”). If I click the gear wheel, nothing happens. (But I can open the “Tools” dialogue). Does the most popular list on the page still get updated? What happened? Kind regards, Michael

    Edit: I have a second backup server for the page https://agbuere.dyndns.org and I have more control over this server. I updated there manually and the phenomenom is the same. Plugin broken after update.

    Wordpress Version 6.0. A few other plugins (most notably WP Rocket) but Popular Posts was playing with all of them without any problems for a long time. I didn’t make any changes to my config, and all was fine until exactly the update of Popular Posts. Also reproduced it on a second server –> only updating the plugin to V6.0.1 with no other changes anywhere at all breaks Popular Posts.

    • This topic was modified 1 year, 7 months ago by agbuere.
    • This topic was modified 1 year, 7 months ago by agbuere.
    • This topic was modified 1 year, 7 months ago by agbuere.
    • This topic was modified 1 year, 7 months ago by agbuere.

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi @agbuere,

    if I go to the settings page whatever I click I only see a revolving grey circle (probably meaning something like “wait, processing”). If I click the gear wheel, nothing happens.

    Are you seeing any error messages on your broswer console? Also, is this happening on a specific browser? Does it happen on other browsers as well?

    Does the most popular list on the page still get updated?

    Yep, that should be fine. The plugin should still be tracking views normally.

    Thread Starter agbuere

    (@agbuere)

    Yes, there are errors on the console:

    load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:5 JQMIGRATE: Migrate is installed, version 3.3.2
    pixel.gif:1          Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
    chart.min.js:1          Failed to load resource: the server responded with a status of 404 ()
    load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2 Uncaught Error: ChartJS library not found
        at Object.init (chart.js?ver=01b9e0818cf24d65ec0b8a3b9c1321e8:144:19)
        at HTMLDocument.<anonymous> (admin.js?ver=01b9e0818cf24d65ec0b8a3b9c1321e8:7:22)
        at e (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2:30038)
        at t (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2:30340)

    Checked with the second server also:

    load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:5 JQMIGRATE: Migrate is installed, version 3.3.2
    pixel.gif:1          Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
    chart.min.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
    load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2 Uncaught Error: ChartJS library not found
        at Object.init (chart.js?ver=cfb54540f7717dd3f1a27fa5d23c8205:144:19)
        at HTMLDocument.<anonymous> (admin.js?ver=cfb54540f7717dd3f1a27fa5d23c8205:7:22)
        at e (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2:30038)
        at t (load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.0:2:30340)

    Thanks a lot for your help! Kind regards, Michael

    Thread Starter agbuere

    (@agbuere)

    My browser is Google Chrome 103.0.5060.114 under Ubuntu.

    I also checked with Firefox 102.0.1 under Ubuntu same problem log is:

    Diese Seite verwendet die nicht standardisierte Eigenschaft "zoom". Stattdessen sollte calc() in den entsprechenden Eigenschaftswerten oder "transform" zusammen mit "transform-origin: 0 0" verwendet werden. options-general.php
    JQMIGRATE: Migrate is installed, version 3.3.2 load-scripts.php:5:709
    Laden fehlgeschlagen für das <script> mit der Quelle "https://agbuere.de/wp-content/plugins/wordpress-popular-posts/assets/js/vendor/chart.min.js?ver=01b9e0818cf24d65ec0b8a3b9c1321e8". options-general.php:59:1
    Uncaught Error: ChartJS library not found
        init https://agbuere.de/wp-content/plugins/wordpress-popular-posts/assets/js/chart.js?ver=01b9e0818cf24d65ec0b8a3b9c1321e8:152
        <anonymous> https://agbuere.de/wp-content/plugins/wordpress-popular-posts/assets/js/admin.js?ver=01b9e0818cf24d65ec0b8a3b9c1321e8:7
        jQuery 2
    chart.js:152:19
    Plugin Author Hector Cabrera

    (@hcabrera)

    Hmm. So the library that the plugin uses to load the Stats chart is not being loaded by your browser for some reason (see the “Failed to load resource” message next to chart.min.js?)

    Interestingly, it loads just fine for me on three different sites and with different browsers (Google Chrome and Firefox, Windows 10).

    Anyways, I think I know why this is happening. This should fix the issue:

    1. Go to Plugins > Plugin File Editor and select WordPress Popular Posts using the dropdown near the top right of your screen.
    2. Click on src > Admin > Admin.php.
    3. Around line 512, change chart.min.js to Chart.min.js
    4. Scroll down and click on the Update File button to save changes.

    Please report back your results.

    Thread Starter agbuere

    (@agbuere)

    Yes that’s it. I made the change on both servers and – boom – plugin on both is working perfectly fine again. Thank you so much for your help! But I’m afraid you’ll get this problem with many users. I don’t see how this can be on my side, especially since the two servers are completely apart (one is a rented wordpress publishing package at strato, the other homebrewn). It’s your business, of course, but I think you need an emergency fast fix for all users. Anyhow, thank you so much again for your quick and friendly help. Kind regards, Michael

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yep, I just wanted to confirm the cause of the issue before I release a patch for it 😛 So thanks for reporting back!

    I’ll release version 6.0.2 shortly.

    Plugin Author Hector Cabrera

    (@hcabrera)

    As for why this happened, apparently web browsers on Linux are less forgiving with filenames: on Windows, chart.min.js and Chart.min.js are the same file. On Linux they are different, hence the 404 Not found error message.

    (Or at least that’s what I think the problem is.)

    Thread Starter agbuere

    (@agbuere)

    I can’t say what the server for the Strato WordPress Publishing Package is, but I can confirm that the backup server runs Ubuntu Server V20. Kind regards, Michael

    Thread Starter agbuere

    (@agbuere)

    PS Is it really possible that the same server delivers the script for a Windows browser (ignoring caps), but not for a Linux browser? Should I check it? (I’d have to undo the change on one of the servers but no prob). Kind regards, Michael

    Plugin Author Hector Cabrera

    (@hcabrera)

    If my hunch is right then it’s more of a browser issue for Linux users (you in this case, since you use Ubuntu) than an issue with the server where your site lives. The server itself could be using Windows, the problem itself is something else. See below.

    What I meant to say earlier -and sorry if I wasn’t clear enough- is that on Linux web browsers see chart.min.js and Chart.min.js as different files. When your browser tried to load chart.min.js from the server it found that the file doesn’t exist, hence the 404 error: the actual file on the server was called Chart.min.js, with capital C.

    On Windows, web browsers apparently don’t care whether the filename uses uppercase letters or not. They treat chart.min.js and Chart.min.js as the same file and so the file is loaded by the browser and everything’s fine. That’s why I didn’t realize that the Stats page was broken since I don’t use Linux on my machine (yet, hopefully someday). For me the Stats page loaded normally.

    Anyways, version 6.0.2 is out. If you haven’t updated yet please do so as it contains a patch that fixes the issue with the filename.

    • This reply was modified 1 year, 7 months ago by Hector Cabrera. Reason: Reworded for clarity
    Thread Starter agbuere

    (@agbuere)

    I have just patched on one server all fine now. Thanks again. Regarding the 404 – isn’t it the server that reports the file as missing to the browser? Maybe Apache can be configured to ignore caps, and in my servers this isn’t configured? Or do browser and webserver initially agree with a kind of handshake whether caps should be respected or not? If it helps, I still could set up a Windows test environment and recheck with the old code and a Windows browser. But you fixed it anyway and I don’t want to steal your time. All the best for you and many thanks for your great plugin. Kind regards, Michael

    • This reply was modified 1 year, 7 months ago by agbuere.
    Plugin Author Hector Cabrera

    (@hcabrera)

    Actually, just remembered that I had a similar problem with a project I was working on a long time ago where a developer from my team accidentally created two PHP files with the same name (eg. foo.php and FOO.php).

    For them the project ran without issues on their Linux machine. When I tried to run the same project on my Windows machine the project broke because Windows saw the two files and decided that they were the same thing and that caused some PHP fatal errors (the code on the two files was duplicated and also had differences between them, being one an older version of the other).

    So yes, one has to be careful when naming files or else issues like this one will happen 😛

    Plugin Author Hector Cabrera

    (@hcabrera)

    Maybe Apache can be configured to ignore caps, and in my servers this isn’t configured? Or do browser and webserver initially agree with a kind of handshake whether caps should be respected or not?

    I wouldn’t worry about this. The default server configuration should be good enough in most cases, this isn’t something you should be changing unless you have a very good reason to do so. Users like yourself shouldn’t worry about how the plugin names its files, the fault is 100% mine.

    All the best for you and many thanks for your great plugin.

    Likewise, hope you have a great weekend and thanks for the compliments!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Broken after update’ is closed to new replies.