silverstripe / cwp-core

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

FIX Update Subsite namespace and ensure search boost extension exists before checking for its use #12

Closed robbieaverill closed 6 years ago

robbieaverill commented 6 years ago

Since the search boost extension lives in the cwp/cwp module, we should check if the class exists before using it in logic.

Issue: #1

NightJar commented 6 years ago

Do you think it would be reasonable to create an issue (ie. not do this now) to move the boosting into cwp/cwp, instead of having class tests here?

robbieaverill commented 6 years ago

Yeah probably. Feel like doing that?

NightJar commented 6 years ago

(ie. no, lets do it now) Sure.

NightJar commented 6 years ago

Slight snag - optional dependency of Fulltext Search module is currently not actually optional. Although the classes that extend from those in fulltext search (SolrIndex, et. al.) are not touched if the fulltext module isn't installed, it will prevent a flush, and thus a dev/build (or any other service in SilverStripe that uses class_exists for these subclasses specifically).

The best way around this would be to split the extending classes out into their own cwp-searchsupport module, so they can be optionally used based on a site's requirements. However for this to happen the greater discussion around the future of recipe structuring in CWP needs to have happened and come to an agreed solution. So I'll leave this for now.

NightJar commented 6 years ago

Ref #14 for detail on & record of the above.