I have the most recent Grav installed (I always keep it updated). My pages would be considered static, I mostly don’t edit anything. However on occasion, I need to fix a typo. If I log into the GUI backend of Grav, and try to edit the page, it all works great, I save the page, and it seemingly works fine. However, The page ends up being duplicated, and no change is reflected. The page shows double in the menu system too. I’m using a basic setup with Learn2Git theme. If I go onto the server, and edit the docs.md page manually as a text document, I don’t have this problem. Any ideas, thoughts? I think this may be a basic Grav Bug.
Sounds more like some plugin bug. Could you share a video recording of the process maybe? From page list to editing to saving
I don’t think a video would help in any way. Everything acts like it is working as normal. However, here is a screenshot of the plugins I have installed. I tried to figure out what plugins are in a standard install a year ago, because I want to remove everything that is not necessary, but there didn’t seem to be a way to figure that out.
Try disabling one by one and see if it fixes the saving.
That is bad advice… I did that before, and broke the site! Obviously I did fix it, but it took a good amount of time and effort. I’m not a programmer, just a web page builder.
I can only guess it’s one of the two things:
- You’re doing something wrong, hence the video request. Even though it’s easier to test, I don’t think it’s that
- Some plugin is messing it up. If you’re not willing to test this, I don’t think there’s a point discussing further. Just do it offline and not on live website
I don’t have an offline version. I’m not a programmer. I only have the live site. I moved over from Wordpress in search of a simpler model that isn’t so resource intense. Grav has been that… but not without it’s issues.
It is a waste of my time to make a video, because literally the editor opens, I can edit the page without any errors. I save it, and all is good. However when I reload the page structure, it then shows a duplicate page, and neither of them retain any of the edits I made. No error is displayed, everything works as normal.
I have removed some plugins, but when I ran into the one (which I don’t remember now) my website refused to load at all. I don’t even remember how I fixed it, but it was through ssh and cli manually restoring the plugin. It was enough that I don’t care to do that again.
It really seems to me that GetGrav is much more suited to the developers of GetGrav, and not really for people like me that are not programmers. I’m looking for a different flat file approach that is similar to GetGrav, where I can mostly drop my already made markdown files in, and it work. I’m just looking for one with the least amount of work on my part. However I need to keep GetGrav running until then.
Would you be willing to share your /user
folder? Just without accounts or other data that may contain passwords or other secrets maybe
@shane, The issue hard to understand because the behaviour is so unexpected. Eg. if there is a permission issue on the filesystem, I would expect an error being thrown in the UI. Grav does not have the habit to silence errors…
A few questions based on guessing in the dark:
-
Have a look at the filesystem and check the folder and file permissions and ownership.
-
Test if the account used by Apache can override the folder/file.
-
Do you use diacritics in filenames?
-
Does Admin create a new folder as well, or only a second *.md file?
-
Are there any JS errors shown in the console of the browser?
-
Are there any errors logged in /logs/grav.log
-
Are there any errors logged in the logfiles of Apache/nginx?
-
You have installed an enormous amount of plugins which you probably do not need. The fact that a website crashes when a plugin is disabled, is suspicious, but can be caused by incorrectly including partials in Twig without checking if plugin is enabled.
A few plugins raise questions:- Auto Date is 9 years old and updates the frontmatter when saving the page. It might generate a conflict, but haven’t looked at the code.
- Crawler Detect: I don’t yet see the benefit of this old plugin
- GitSync will probably not cause issues, but will not be necessary when you only have a single production installation.
- Static Generator doesn’t seem valuable when having only a single production server.
- Etc. etc…
I think it is a good idea to do some weeding…
- Backup/copy folder /user to a save place
- Go through all your plugins you probably do not use:
- First disable the plugin (via Admin or in config file of plugin)
- Clear cache
- Run website
- If no errors, delete folder of plugin or remove via Admin
- In case of error, re-enable plugin (via Admin or in config file of plugin). In case of difficulty, restore your saved backup.
So, you guys have given me an idea. I will create a temp subdomain, do a clean install of GetGrav, and move my pages all over, and see if things work better once setup. If so, I can do a clean install of GetGrav, and restore my files there, and should rid myself of any unnecessary plugins. If that fails, we can move to further troubleshooting actions.
@shane, Sounds like a good idea… Keep us posted!
It would be even better when you use a laptop/pc to create a local installation on which you can experiment without fear.
Ok, I created a subdomain, installed a fresh install of GetGrav, copied all my pages over, set the Learn Theme (which worked great). I edited a page, and have the exact same results. Here is a video of it I made.
That is the duplicate entry of the page.
Here is the entry of my top portion of my page (front matter?)
---
title: Génesis 4
taxonomy:
category:
- docs
process:
markdown: false
twig: true
---
Because I was in there working on it, I took the time to switch themes from learn-git to learn, and removed that theme (seems it was outdated). It had a bunch of dependency plugins which I removed, I also removed another theme which had a bunch of plugin dependencies, and only broke the site once. I basically trimmed out all the plugins that were not listed on the clean install. This has helped clean up my site. But the original problem still exists.
Maybe it’s just me, but video dosn’t play and when opened in a separate window, asks to log in
Also, what plugins do you have now left?
It didn’t allow me to upload it here, so I uploaded it to Dropbox, and copied the link. I’m not sure how to get that to work. I only have 10 plugins left.
Admin Panel v1.10.48 | ||
---|---|---|
Email v4.1.2 | ||
Flex Objects v1.3.7 | ||
Form v7.4.2 | ||
Login v3.7.9 | ||
Markdown Notices v1.1.0 | ||
Problems v2.1.2 | ||
Taxonomy List v1.4.0 | ||
TNT Search v3.4.1 | ||
YouTube v4.2.0 | ||
I’m not sure I need them all, but I have audio that plays from mp3… and I don’t remember how I did that. So I don’t want to break it. ![]() |
@shane, I cannot reproduce the issue…
I did the following:
- Fresh install of Grav
$ bin/gpm install learn2
- Set theme to learn2 in user/config/system.yaml :
theme: learn2
- Opened Admin in browser
- Edited content of page 'Typography` and saved it
- No issues, no duplication, page is updated.
Please show us a similar script to reproduce the issue.
NB. See MDN for playing MP3 files.
- Fresh install of Grav
- installed learn2 (with GUI)
- Set the theme to learn2 with GUI
- copied all my pages from the install to this one via command line (there are over 1000 pages)
- Cleared cache (with GUI)
- Clicked on pages and edited the page. Added text and saved.
- Clicked back, and page then shows duplicated (both retained the edit this time)
- I open the webpage in the browser (to view it, and the page is duplicated in the menu too.)
What is a good way to privately send a zip file of a small sampling of my page so you can test it?
@shane, Did you and if not, can you test my bare script first? If you can reproduce the issue with the bare Grav installation, then it is not your pages, not the amount of pages, but something else.
Ok, I did a clean install on the subdomain, set the theme to learn2, and edited the page. It didn’t duplicate. So that confirms it is my pages… I have no idea where to look.
@shane, how does your /user/pages folder look like.
Create tree using $ tree user/pages
. You might need to install it first.
tree user/pages
user/pages
├── 01.blog
│ ├── blog.md
│ ├── classic-modern-architecture
│ │ ├── item.md
│ │ └── unsplash-luca-bravo.jpg
│ ├── daring-fireball-link
│ │ └── item.md
│ ├── focus-and-blur
│ │ ├── item.md
│ │ └── unsplash-focus.jpg
│ ├── hero-classes
│ │ ├── hero-classes-child
│ │ │ └── item.md
│ │ ├── item.md
│ │ └── unsplash-overcast-mountains.jpg
I’m on shared hosting and cannot install tree. But it looks like this:
01.Genesis/001-Capitulo-1/docs.md
01.Genesis/002-Captiulo-2/docs.md
This goes consecutively up to 50
02.Exodo/001-Capitulo-1/docs.md
02.Exodo/002-Capitulo-2/docs.md
You get the idea. I built it with bash script that made all the folders and files, and then used another bash script to paste the data into the files.
I truly wish I understood the naming, because I would do it more simply:
01.Genesis/doc1.md
01.Genesis/doc2.md
01.Genesis/doc3.md
But I can’t figure out how to get Grav to recognize that structure.