Support » Plugin: Travelers' Map » Issue TravelersMap 2.0.1 with W3TotalCache

  • Resolved Rob de Cleen

    (@rdc2701)


    Hi,
    I have noticed an issue with Travelers’Map 2.0.1 and W3TotalCache Version 2.1.8.
    When W3TC is activated, the maps don’t show up (leaflet.js files are missing).
    When W3TC is de-activated, the maps show up again.

    This issue did not happen with Travelers’Map 1.12.1, and the W3TC config has not changed.

    Do you have any idea why this happened?

    Rob

    • This topic was modified 1 month, 4 weeks ago by Rob de Cleen.
Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Author Camille V

    (@socrapop)

    Dear Rob,

    I changed the version on files with the new update, but that’s strange.

    Did you clear the W3TC cache manually (I don’t know the plugin but there should be a button to clear cache)?

    Thread Starter Rob de Cleen

    (@rdc2701)

    Hi Camille,

    Of course I cleared all caches, first thing I tried. In the W3TC settings I tried excluding all possible leaflet.js files (theme and TM) from the minify cache as well, did not make a difference.
    One more strange thing I noticed is this: in combination with W3TC and Falang Translation, the map shows on the secondary, tertiary etc. languages, only not on the main (default) language.

    I will send you a regular mail if maybe you want to have my W3TC config file to try it yourself.

    Kind regards, and thanks for the support!
    Rob

    I have similar problem with Autoptimize plugin. It worked correctly with v1.12 now I’m facing the same behavior as described above with version 2.0.1. Tried to delete cache but with no success… The only thing that works is to disable Autoptimize.

    @pacous disabling JS optimization or aggregation should also work though?

    frank (autoptimize developer)

    Plugin Author Camille V

    (@socrapop)

    Dear @optimizingmatters, thank you for coming here.

    I think this commit is the cause, can you confirm this? The constant for script versionning set in another file might not work with caching plugins?
    https://github.com/Socrapop/travelers-map/commit/ed9ef511786d3514d38b52063f34aeac3cdbaf98

    I can’t test right now :/

    Have a nice day,
    Camille

    Thread Starter Rob de Cleen

    (@rdc2701)

    Hi,

    I tried to revert to the code before that commit which Camille mentioned, but it does not solve the issue with W3 Total Cache.

    Rob

    Can’t really comment as I don’t know the plugin/ functionality, but the version string is unlikely to be the reason. Did anything in the JS-file (or the inline JS) change?

    Re. optimization plugins: excluding plugins/travelers-map/ from the JS optimization (adding it to the comma-separated JS optimization exclusion list in Autoptimize) should fix probably this.

    Plugin Author Camille V

    (@socrapop)

    I think I understand this issue. I tested on a local environment with Autoptimize, and this error appears in the console:
    Uncaught SyntaxError: import declarations may only appear at top level of a module

    We used import statements in our JS files during refactoring. We divided the JS files into multiple files for clarity. The import statement is then broken when the js files are aggregated together.

    I will have to generate one js file with a compiler for the next update! In the meantime, you can deactivate JS aggregation in your respective caching plugin šŸ™‚ I’ll try to do it this week-end.

    Have a nice evening,
    Camille

    Thread Starter Rob de Cleen

    (@rdc2701)

    Thanks for looking at it, Camille. You have a nice evening too. I think you did a great job with 2.0.1, there is very little nags and you just can’t ever cover all different possibile usage bases beforehand šŸ™‚

    Indeed you are right, for those using W3TC, just go to:
    > Minify > JS > uncheck “Enable”

    When it is enabled, changing the method doesn’t work (Combine+Minify, Minify, Combine Only), you really need to disable JS minification and aggregation.

    Excluding the leaflet.js file in “Never minify the following JS files:” also does nothing, so just disable JS minification when using 2.0.1 for now, then it all works again.

    • This reply was modified 1 month, 3 weeks ago by Rob de Cleen.
    • This reply was modified 1 month, 3 weeks ago by Rob de Cleen.
    Plugin Author Camille V

    (@socrapop)

    Okay, V2.0.2 is online in the next 5 minutes, please try it and tell me the results šŸ™‚

    @rdc2701 @pacous

    Nice week-end everyone !
    Camille

    Thread Starter Rob de Cleen

    (@rdc2701)

    Thanks for the quick work, Camille. Will test and let you know here. Hope you have a great relaxing weekend.

    Rob

    Thread Starter Rob de Cleen

    (@rdc2701)

    Hi Camille,

    Unfortunately with 2.0.2 the maps don’t show up, neither with W3TC disabled nor with W3TC enabled.
    leaflet.js files are missing…

    Rob

    Plugin Author Camille V

    (@socrapop)

    Mh it is strange, I tested W3TC and Autoptimize with v2.0.2 and everything work, on my local environment and on my live website.

    Could you try to clear your browsers cache? It shouldn’t be that because the file version has been changed, but we never know!

    Thread Starter Rob de Cleen

    (@rdc2701)

    Yes, of course I cleared the browser cache many times. This result is with the Enfold theme, no maps showing either on blog post or on pages. Maybe there is something in their way of including OpenStreetMaps in the theme. I will send you a mail with a temporary login to a development server if you want to have a look.

    Same here. Unfortunately still doesn’t show the map. But anyhow, there is small improvement. Version 2.0.1 caused strange behavior of the page in general – featured image of articles were not loaded. With 2.0.2 the whole page seems ok, unfortunately still except the map. Fingers crossed to fix this issue.

Viewing 15 replies - 1 through 15 (of 18 total)
  • You must be logged in to reply to this topic.