Where's the code in concrete 5.6.0.2?
Permalink
Hi, where has gone a good portion of the core code??
For example, in the file:
concrete\models\system\captcha\types\securimage\controller.php
All that it's inside is:
Where has the code gone??
And I can see that many files that I used to check/overwrite in the core are this way now.
For example, in the file:
concrete\models\system\captcha\types\securimage\controller.php
All that it's inside is:
class SecurimageSystemCaptchaTypeController extends Concrete5_Model_SecurimageSystemCaptchaTypeController {}
Where has the code gone??
And I can see that many files that I used to check/overwrite in the core are this way now.
[root]/concrete/core/
Oh, I see... thanks a lot.
But, how do I override those files?
I don't understand why now there is yet another duplication of the c5 directory structure... one in [root]/concrete another one in [root]/ for overrides and now ANOTHER one in [root]/concrete/core ? wow.
But, how do I override those files?
I don't understand why now there is yet another duplication of the c5 directory structure... one in [root]/concrete another one in [root]/ for overrides and now ANOTHER one in [root]/concrete/core ? wow.
You can override them the same way as before. This 'empty' file is part of a new architecture.
From what I understand, the old way of overriding files in 5.5 was to completely replace the core file with your own file. There is a fundamental problem with this architecture because when an improvement is made to the core file, your installation won't see it because you have over-ridden the entire file. You would have to re-apply your over-ride tweak into the new improved version of the core file in order to take advantage of their improvement while still having your custom tweak.
In 5.6 they implemented a different architecture that allows the core files to be 'extended' by over-riding just the functions you want to tweak. Now when improvements happen in a core file, you are much more likely to see these improvements reflected in your site unless you were over-riding the specific function that was improved.
There's also a new setting in the Dashboard where you can speed up your site by caching all your over-rides so it doesn't have to check whether each file has an over-ride.
C5 isn't perfect (no software ever is) but Andrew knows what he's doing.
From what I understand, the old way of overriding files in 5.5 was to completely replace the core file with your own file. There is a fundamental problem with this architecture because when an improvement is made to the core file, your installation won't see it because you have over-ridden the entire file. You would have to re-apply your over-ride tweak into the new improved version of the core file in order to take advantage of their improvement while still having your custom tweak.
In 5.6 they implemented a different architecture that allows the core files to be 'extended' by over-riding just the functions you want to tweak. Now when improvements happen in a core file, you are much more likely to see these improvements reflected in your site unless you were over-riding the specific function that was improved.
There's also a new setting in the Dashboard where you can speed up your site by caching all your over-rides so it doesn't have to check whether each file has an over-ride.
C5 isn't perfect (no software ever is) but Andrew knows what he's doing.
Yes, that makes sense. Thanks for replying!
Here are the discussions leading up to this change. Interesting stuff.
http://www.concrete5.org/community/forums/customizing_c5/extending-...
http://www.concrete5.org/community/forums/customizing_c5/architectu...
http://www.concrete5.org/community/forums/customizing_c5/extending-...
http://www.concrete5.org/community/forums/customizing_c5/architectu...