everything went as expected. However, whenever I edit an existing “product”, the “collection” folder keeps reappearing, so my structure looks like this:
Did you simply rename folder directly in the filesystem? I suspect you neglected to also update the corresponding blueprints and templates.
If you look under the title field, it will show the page url (which im guessing still says collection on your existing articles). Try clicking the wand and it should fix the path.
The blueprints and templates are independent of the name of the folder, only text file name and template/blueprint name must be the same.
If you change stuff directly in the filesystem (instead of via the Panel), it is advisable to log out of the Panel and then log in again to make sure there are no leftovers in the session.
Yes, I renamed the folder directly in the file system. I’ve double- and tripple checked all blueprints and templates, and made sure the text file name and the template/blueprint name are identical (shop.txt, shop.php, shop.yaml).
No, if you rename a folder, you don’t even have to change the template etc or rename the text file. And a text file with the wrong name does not misteriously create a new page. Also, you can have as many templates or blueprints without a corresponding page.
Is there maybe a page builder in your site.yml? I can’t think of an explanation that would make sense, unless there are some ghosts doing their job.
Strange enough, this problem occurs only if I change an entry that uses a Structure field. To explain, I have a “simple” product (product.txt / .php / .yml) and a “product with options” (productoptions.txt / .php / .yml) template. The latter uses a Structure field; and only if I make changes in a productoptions.txt file via the panel, the folder mysteriously reappears.
Interesting. When i first learnt Kirby a couple of years ago, I understood from the docs that for a page to work, you needed a blueprint and a corresponding template, and when you create a page it names the text file after the template chosen for the page. If you delete a template and a page in the site is still using it, it will revert to the default template.
@anteante That blueprint doesn’t make sense. You are disallowing pages but have a limited template option. The templates to use should be defined in the parent template, i.e. the shop.yml.
from my productoptions.yml as it really does not make sense there. However, the problem persists. When I make a change in a productoptions.txt file, the “collections” repears.
@texnixe I guess you must be right … spookey it must me something on my computer, maybe a git issue! I just transferred the whole project to a remote server (instead of localhost) and it seems to work fine
Sorry for taking up your time, and thanks (again!) for the swift support!
I have definitely had folders resurrect themselves after renaming on some of my projects and it was down to incorrect naming conventions in the blueprint/templates. Maybe it was session data doing it, I don’t know how else to explain it.
Also i wish the emoji picker on the forum worked in Opera
Git doesn’t usually resurrect pages unless you undo something. I’d rather think it was a session issue.
I’d clear the browser cache, log out and in and maybe even replace the Kirby and panel folders with fresh copies. Or copy everything into a new project folder on localhost.
Sometimes, you just don’t know why things happen, like socks disappearing…