Content dublicate

Hi community.

Have a strange situation. I have some bugs or issues. And can’t find the reason for it.
I have a template type “review”. And some times when I update reviews for some unknown reason Kirby creates duplicate pages (in same-name folders but with different template types it creates a default template with empty content it only uses the name for creating this page) and of course, this takes issues on the frontend. in all loops and snippets, Kirby starts to use these pages instead of using original pages.

Is this a multilanguage setup?

setup is multi lang but only one language is in use

Do all the txt files in the folder have the correct language code in the name? (e.g. review.en.txt)

So, no strange names like review.en.en.txt or review.txt.

yes all txt have the correct file names moreover it could create more than one duplicate as we see on this screen.

Ah, I misunderstood the problem. I thought it created a default.en-au.txt inside of the same folder, but it’s actually creating copies of the folder.

I don’t know what’s happening, it shouldn’t be possible to have multiple pages with the same name.
Do you have any plugins or hooks installed / configured?
Also what Kirby version is this?

this issue starts happening after updating kirby to 4 version.
Sure I have some plugins. but it’s very hard to detect which plugin could appear to this problem.

Let’s see… Maybe new fresh ideas will be written here. Or I will find a solution myself and also write feedback here.

I wonder if something is duplicating those pages at a lower, file-system level for some reason. But normally, if you try to create a page with the same slug, Kirby will complain. Did you update to the latest version 4.2.0 or to another 4.x version? Did you update all plugins as well? Which ones are installed?

Just brain dumping here. It looks like there’s some code that dynamically changes the page sorting number, but does so in an unexpected moment (so that Kirby doesn’t, or is unable to, rename the original folder). Kirby at some point then sees that “the root doesn’t exist” and therefore creates it, maybe to write the UUID or something. The content storage refactor of Kirby 4 could have triggered this.

So I’d look for code that could have an effect on the page root:

  • a page model overriding “root” or “num”
  • a page update hook
  • plugins
    Etc…

I’ve started re-creating full site because of this issue) is very annoying