weird bug in the new concrete5 when overriding core js and css and turn on cache

Permalink
I had to modify lightbox.js to adhere to user input when my client wanted to have exact height boxes. I created an override js by going to the /application and create a js folder and added lightbox.js. I also modified the css for the light box as well by following one of the tutorials. When I turn the css and javascript cache on in the optimization section, the overrides get ignored and no css and js for the lightbox is added, essentially making the lightbox unusable. This doesn't happen in mobile for some strange reason... Does anyone have any idea why this happens?

 
JohntheFish replied on at Permalink Reply
JohntheFish
The core doesn't treat js and css files as overrides. By placing them in the application js and css dirs it would be loading them or combining as if they were different assets. With css, if it loads last, it likely rules the cascade and you wouldn't notice apart from the inefficiency of double loading. With js, I am surprised you are not getting script errors about duplicate declarations.

You may be able to get round it by your code 'providing' the assets in the same way as a theme would, so telling the core that you provide the asset and not to load its own. (That is just an idea, not something I know would work).