I found a solution, although it might be specific to our case.
This is how I solved it:
1. I downloaded a plugin called Health Check https://www.ads-software.com/plugins/health-check/
2. I used the troubleshooting mode of that plugin to turn off all the plugins and themes. This only turns them off for me, visitors won’t notice anything.
3. I first turned on King Composer and the theme I want to use. King composer worked!
4. I started turning on the plugins one by one, always testing if it had an effect on King composer.
Using this method I figured out that Yoast SEO was causing the problem for me. A week earlier we had malware on our site and had to delete the bad lines of code. We accidentally deleted this:
<?php
/
from one of the files of Yoast SEO (called WordPress SEO in the file structure).
So that was what caused the problem for us. Based on our case it might be same for others. A conflict caused by a plugin not being able to load on the page where you edit the page or post.