re: if I add an entry then submit the form, when the page refreshes, I get an “Add directory” link on the menu rather than an “Edit directory link”. I was able to add multiple entries this way, which isn’t ideal!
This was a configuration setting… you had enabled the link to display. Some users what users both to maintain a specific entry and the ability to add new entries so this is an option that can enabled/disabled. I turned it off in the settings for you.
The tweak I made would not change the token mismatch error. I disable the logic that would throw the 404. So, I still suspect the token mismatch was due to the caching.
The 404 logic does highlight two bugs in the code that were not apparent before. I’m tackling these right now and will make the fixes on you site so you can verify that it works.
I’ll reply back after I have these two bugs fixed. I expect to have them addressed in the next few hours.