Overriding the pat-autotoc pattern

I am trying (and trying) to override the autotoc pattern. How is one supposed to do that?
(I need to add an id to '

  1. I edited the file on the file system, so 'mockup-patterns-autotoc' in the resource registry returns the new javascript.
    In other words: http://localhost:8080/plone/++resource++mockup/autotoc/pattern.js shows the correct javascript
  2. I rebuild all the bundles, tried both TTW and with bin/plone-compile-resources
  3. The site still returns the old javascript
  4. Added new Plone site... still the same javascript

Yes dear forum I really want to exhume this old post.

I am sure that the OP finally found a way, but for anyone stumbling on this post for a search or another, I have seen the very same problem and realized that the file on the server is cached by the browser.

For some reason the browser don't understand that the file has changed, probably because the server sends first to the browser the list of files that it needs to rebuild (in this process the workstation is logically a 'server' because it does the work and the Plone server is logically a client), then the Javascript on the workstation rebuilds the minified result that it returns to the Plone server. But it is the cached version on the workstation that is used in the build, and is then returned minified to the server.

A way to avoid this nice problem is to load the file on another browser window (with its Plone resource address in plone++), it's then possible to see that the old version will still be used by the build, and hit F5. When the changes can be seen on the file browser windows, then the rebuild can succeed (it's necessary to hit F5 another time after the build to retrieve the compiled bundle from the server)

Apart of that it works really fine. Except when there is a small syntax error then it hangs without any error message :slight_smile: .