I'm on the latest build 3.5.3. I created a Lightswitch field type within a Matrix field in my local dev env and called it "colorBlock". No problems there. When I recreated this in my staging env I got an error trying to save the Matrix config saying I couldn't use the name "colorBlock". So I changed it to "colorBlock1" and everything worked fine.

I'm now trying to troubleshoot a persistent Updating Search Indexes -> Failed alert and tracked it down to a message in my logs: "Invalid field handle: colorBlock". I am not using this label for any field type I've created. When I grep all the files, I see instances of "ColorBlock" in CustomFieldBehavior.php and delta.yaml.

Any advice on how to resolve?

  • How/when did you create your staging environment? It sounds like project config is on? If that's the case, colorBlock would appear in staging? You might also want to try clearing storage/runtime caches? Aug 13, 2020 at 17:59
  • Thanks @RitterKnight! Originally they local dev went to staging, but for various reasons, the two are running a separate DB. This is the only instance of a field handle appearing in staging after many similar actions. What's the best way to clear the storage/runtime caches? Aug 13, 2020 at 18:53
  • From the CP, Utilities -> Caches. From command line, cd into the same folder as your composer/craft files are and ./craft clear-caches/all. You can also do it manually going into storage/runtime folder and removing folders (eg rm -r cache). Aug 13, 2020 at 20:22
  • BTW: if local and and staging db go out of sync, the project config gets confused. Wondering if that's what you're seeing. Aug 13, 2020 at 20:24
  • Thanks for the tips! Clearing caches didn't work for me. Regarding config getting out of sync, I've been very careful to only sync templates and CSS between the two, so don't think that's an issue. Also, this is the only time I've seen this problem (or any problem like it). Aug 13, 2020 at 22:30


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.