silverstripe / silverstripe-elemental

Create pages in Silverstripe CMS using content blocks
http://dna.co.nz
BSD 3-Clause "New" or "Revised" License
110 stars 115 forks source link

ElementsForSearch returns empty during Solr search indexing #362

Closed thats4shaw closed 6 years ago

thats4shaw commented 6 years ago

This is a strange one and I swear this was working previously however I'm not having any luck retracing my steps.

I'm finding that ElementsForSearch method appears to be returning empty in the context of Solr search indexing.

The CMS search is working as per normal and I'm just using the basic indexer supplied by this module.

I initially wondered if it was some what related to https://github.com/dnadesign/silverstripe-elemental/issues/228 and https://github.com/dnadesign/silverstripe-elemental/issues/271 but it's finding the templates fine.

From my debugging it appears $ElementControllers is empty in templates/DNADesign/Elemental/Models/ElementalArea.ss.

Module versions:

dnadesign/silverstripe-elemental 3.0.x-dev a643f4d 
silverstripe/fulltextsearch  3.3.1
silverstripe/fulltextsearch-localsolr dev-master f2a799e
silverstripe/recipe-cms  4.2.1 
robbieaverill commented 6 years ago

There may have been a regression. If so, we can revert it since it hasn't been released yet

robbieaverill commented 6 years ago

@thats4shaw are you able to test this with those changes reverted?

thats4shaw commented 6 years ago

Absolutely @robbieaverill. What changes in particular?

robbieaverill commented 6 years ago

Sorry, the latest change we merged related to this was https://github.com/dnadesign/silverstripe-elemental/pull/342

thats4shaw commented 6 years ago

After some pretty thorough testing i'm not convinced this is related to the changes in https://github.com/dnadesign/silverstripe-elemental/pull/342 as i've managed to get this working without issue in another project.

I'll reopen this if I can supply some solid reproducible steps.