Sorry for slow reply Admin,
Anyhow, I guess what i was trying to point out was... (please feel free to correct me if any of the points below are incorrect)
For those that have not visited a component project for a few months and then download a current build
- the "[COM_SITE]/fork" directory is no longer created on a clean / fresh install
- the "forkables" are now located in the "[COM_SITE]/_fork"
- the overrides need to still be located in the "[COM_SITE]/fork" directory
- on a fresh component install you will need to create the "[COM_SITE]/fork" directory and place your overrides in there
- a quick way of creating the "[COM_SITE]/fork" directory is to remove the underscore from the _fork directories on the admin and site sides
- and don't be confused when you install a newer version over the top of an existing component you will have both [COM_SITE]/fork and [COM_SITE]/_fork directories
(the same applies for the admin side)
however I must say Great Work!
I appreciate the the fact that we can now drop just one or two files into the fork directory instead of having every "forkable" file loaded by default
May I suggest to avoid confusion with "fork" and "_fork" could the "_fork" directories perhaps be called "forkables" or "_forkables"?
Further Explanation below for those that are a little lost
The builds from about a month ago contained the forkable files in
[COM_SITE]/fork and [COM_ADMIN_SITE]/fork
The current builds contain the forkable files in
[COM_SITE]/_fork and [COM_ADMIN_SITE]/_fork
The helper file from a current build looks for the fork directory as shown below
// Search for a fork to be able to override this class
JLoader::register('TestaltpkHelper', JPATH_ADMIN_TESTALTPK .DS. 'fork' .DS. 'helpers' .DS. 'helper.php');
JLoader::load('TestaltpkHelper');
// Fallback if no fork has been found
if (!class_exists('TestaltpkHelper')){ class TestaltpkHelper extends TestaltpkCkHelper{} }
my problem was
- earlier builds used the fork directory to store all of the "forkables"
- when i did an uninstall and reinstall of my component the "[COM_ADMIN_SITE]/fork" directory was no longer present
- when i noticed the new directory...
- i dropped my previously forked files into " [COM_ADMIN_SITE]/_fork" (thinking that this was the new place that overrides would need to located)
Upon further investigation - it was
not that the fall back did not work
The problem was simply that my forked files were in the wrong directory - this naturally gave an error that indicated an undefined function in.... because TestaltpkHelper::myExtendedFunction() did not exist in the directory [COM_ADMIN_SITE]/fork/helpers
Hope this helps to explain better