0

I'm not sure what the root issue is (Chrome, CKEditor, PHP, Ubuntu, etc.), but this is essentially what's happening:

  1. Using Composer to update CKEditor, I change the version and do an update
  2. I see that the new version doesn't include a specific plugin (like, Autogrow)
  3. After pushing the changes of the composer.json from my local env to production using Git, I update the prod server
  4. All looks fine, except for the plugins that didn't exist inside of CKEditor's vendor folder are being loaded "from disk cache"

I can run Chrome in incognito and verify that the plugins that are supposed to be missing are indeed missing. I can't, however, do a cache refresh in Chrome and have the disk cache remove those directories that no longer exist.

Interestingly, Chrome on Android doesn't have this problem, which is how I noticed something was wrong when CKEditor wasn't loading on my phone (missing plugin).

Attempted Solutions:

  • Remove CKEditor from composer entirely. Push/pull updates. Re-add CKEditor, still seeing those plugins cached in disk
  • Update the ckeditor.js file to be versioned (i.e, ckeditor.js?v=1.02)
  • Ran composer clearcache
  • Tried PHP's clearstatcache()

I'm trying to find a solution that I can do from the developer's end, not as an end user.

I'm attaching a screenshot of the js file being cached in disk.

Any help is appreciated. Thanks

enter image description here

EDIT: This is on:

  • Ubuntu Server 18.04
  • PHP 7.2
  • CKEditor 4.8 through 4.10
user8735467239
  • 376
  • 3
  • 15

2 Answers2

0

If you are using Chrome press Shift + F5.. it will clear the cache

Kaperskyguru
  • 73
  • 3
  • 8
  • Thank you. But this doesn't clear the cache from disk that I shared as a screenshot. I'm also not looking at how the end user can fix it. I'm looking for how I can force an update that, in essence, forces a re-scan of the vendor directory – user8735467239 Sep 04 '18 at 23:22
0

Turns out that this issue has been raised previously:

Force CKEDITOR to refresh config

Credit goes to: @giammin

He wrote:

CKEDITOR.timestamp='ABCD';

just after you link ckeditor.js or anyhow before ckeditor loads all its files

this is the variable CKEDITOR uses to add timestamp to all .js .css files it loads dynamically.

So every time I change those files I update that variable and browsers will reload them.

This worked for me. I can see some files still using an older timestamp, but for the purpose of this question, this solved. Again, credit to @giammin.

user8735467239
  • 376
  • 3
  • 15