Trouble saving edits in the Kirby Panel

Hello Everyone,
I have a really silly problem that I can’t seem to solve on my own. I’ve installed Kirby on my Mac using Mamp.

It used to run fine and I have started adding content to the PHTGRPH template. However, when I launch the panel and try to make edits (changing the description in the Site Options, or unchecking the box related to the social icons display, for instance), then save, clicking on the save button doesn’t save anything but instead the panel goes back to the previous content.

I first thought it was a cache issue and tried Kirby in a different browser but the issue remains unsolved. Reloading Mamp doesn’t make a difference either. I have checked a similar thread on the forum but didn’t find it helpful (something about the -mpconfig file, but I’m no php expert and couldn’t find any guide online to help me install the extension).

Any help welcome! Thank you for reading.

Pls check if there happen to be any stray .txt files, this can sometimes happes if you change to multi-language from a single language site, or if you delete images without deleting meta data files or sth. like this.

If your field names get truncated, the problem might be related to a missing mbstring extension, but I doubt that is the case if you use up-to-date MAMP on Mac.

Thanks Texnixe for your help! There were indeed several files related to a second-langage environment (I found a site. txt AND a site.en.text, among other duplicates). I can successfully discard the site.en.txt manually, and then makes changes directly in the .txt file, but working from the admin panel brings back the site.en.txt file and keeps loading the same content.

I don’t mind working from the raw files since it’s after all the whole point of a flat file website, but it would be nice to be able to work from the panel (to load images for instance) without seeing this file popping again and messing things up. Any ideas on how to fix it permanently?

Do you happen to have multi-languages enabled in your config.php file? If you don’t need multi-language support, you need to delete that option, otherwise you will keep getting language coded text files via the panel.

That makes sense… what if I do want to get multi-language support? (that was actually a part of my initial plan… but if it was too much of a hassle, I’ll drop the idea)
thanks again!

If you are actually planning to have multiple languages in the future, I would start with a multi-language setup right from the beginning, but with only one language enabled, like this:

c::set('languages', array(
      'code'    => 'en',
      'name'    => 'English',
      'locale'  => 'en_US.UTF-8',
      'default' => true,
      'url'     => '/'

(or whatever language and locale you want)

Then just make sure that you rename all your existing text files so that they have the language code (file.en.txt) and that all new files you create manually (i.e. not via the panel) have the language code as well.

Doing this has the advantage that you don’t need to rename all your text files later when you add more languages.

Also, instead of “hard-coding” buttons or link names etc. in the templates, you can use language variables, so that when you add a new language, you do not have to change each template again later.