silverstripe / cwp-core

CWP basic compatibility module
BSD 3-Clause "New" or "Revised" License
3 stars 12 forks source link

Configuration cwptextextraction is not applied #74

Closed ichaber closed 5 years ago

ichaber commented 5 years ago

The configuration of cwptextextraction (in https://github.com/silverstripe/cwp-core/blob/1108756119fd36790ba1ecd30076c555eb3075f2/_config/textextraction.yml#L3) is not applied, because it is supposed to be applied after #textextraction. This name for the config was removed in https://github.com/silverstripe/silverstripe-textextraction/commit/f341010d7aa63d89dbdc05830a731b2ddd8f8671?diff=split#diff-0bcefa158fae7b420415084fad0ee875L2 and re-introduced as #textextractionconfig in https://github.com/silverstripe/silverstripe-textextraction/commit/edb02e91897bf44ebe5150d28f8c3c07272e25d9#diff-0bcefa158fae7b420415084fad0ee875R2. Due to this the reference to the old (SS3) version does not work anymore.

Furthermore the reference to the SS3 class FileTextCache_SSCache does not work anymore, because the class is now namespaced and can be found under SilverStripe\TextExtraction\Cache\FileTextCache\Cache. The config (in https://github.com/silverstripe/cwp-core/blob/1108756119fd36790ba1ecd30076c555eb3075f2/_config/textextraction.yml#L8) is never used to instantiate a class via the injector. Usually it would throw an error that the class FileTextCache_SSCache does not exist if it instantiated FileTextCache via the Injector, but inside the textextraction module only the fully qualified classname is used - never the reference to FileTextCache.

The consequence of this is, that the default SilverStripe\TextExtraction\Cache\FileTextCache\Database is now used on CWP (as defined in https://github.com/silverstripe/silverstripe-textextraction/blob/5b967fd5d37f99ace30cdc9592be9729e41cf973/_config/config.yml#L7 ) instead of the previously used FileTextCache.

robbieaverill commented 5 years ago

Fixed in CWP 2.3.x and up, thanks @ichaber