0

I am using SimpleSearch with the default containerTpl setting (=SearchResults).

It seems that SimpleSearch uses the chunk from core/components/simplesearch/elements/chunks and not my SearchResults chunk which has been saved in the database. So no matter how I edit the chunk on the manager, SimpleSearch always uses the default version of the chunk. I even deleted the cache folder but the problem continues.

I am using MODX3.0.2 with SimpleSearch 3.0.0.

I made also a test snippet with the command:

$modx->getChunk("SearchResults") 

and that returns the correct chunk from the database. But in SimpleSearch snippet, the default version is always returned.

  • It seems that SimpleSearch has its own getChunk method which priorities a chunk save in a file and only after if the file does not exist, it tries to get the chunk from the database. That is weird. – Niko Suominen Jan 05 '23 at 14:18
  • 1
    Have you tried to rename your custom chunk to something else and set in the containerTpl property? – Bram Verstraten Jan 05 '23 at 14:52
  • 1
    Also, do you have pdoTools installed? For some reason the getChunk method tries to use this extra when possible. – Bram Verstraten Jan 05 '23 at 15:00
  • Yes, I have tried to rename the chunks and it solves the problem. I have pdoTools installed too but I debugged that SimpleSearch is not able to use them. – Niko Suominen Jan 05 '23 at 15:09

0 Answers0