-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multilang-Site: Can't save frontmatter changes in expert mode in french language version. #798
Comments
This is 'probably' an admin plugin issue. But we'll leave it here for now in case it's not. |
hmm, after two more rounds of deleting and recreating the aforementioned "partners" mod-page, the problem seems to have dissolved into thin air - saving in expert mode suddenly works. i still have no explanation though... anyways, thanks for your – as always – excellent support @rhukster ! |
for documentation purposes: |
Thanks for the info. Would it possibly be related to a template override? I know we had a bug with that in 1.0.10 but we fixed it in the latest 1.1.0-beta.1 release. |
If it's not that, can put together some exact repeatable steps so we can isolate the problem and get it fixed? |
i think it's quite possible that there's a connection with template overrides. also, i think the bug surfaced only when i upgraded to v.1.0.10. anyhoogen, off for the weekend, will get back to you next week. |
Please if you can try with the Beta package that would help as we did fix some things related to the template override that was causing problems. |
sorry for the delay @rhukster, i was afk over the weekend. i already downloaded and would love to try out the new beta, but i'm still trying to figure out how to integrate it with the existing grav-installation (meaning: i'm not sure exactly which files and folders to copy over). is there a guide for it? also: the aforementioned problem (can't save frontmatter when in expert mode) only exists on our production environment (= on the server), not within my local installation of grav. and since i don't want to "break stuff" by installing the beta - is there an easy way to revert to the last stable version of grav, in case something goes haywire? |
You cannot automatically roll back from 1.1-beta to 1.0. Create a backup via Grav's backup tools, or simply copy the original folder. |
i finally found the time to try the beta 4 version. instead of updating my current production installation on the server, i set up a second installation with the beta version, removed its user folder and then copied the user folder over from the production installation (as suggested in @rhukster 's blog comment). i also updated all the plugins on the new beta installation. unfortunately, the problem still exists in exactly the same form: i can update the front matter of the english version of the site, but once i open up the french version, i can't save anymore (a click on the save button has no effect). i'm sorta out of ideas what to do... |
I don't know if this is related, but upon further investigation i found out, that i'm not able to set the parent page of the modular-page that has aforementioned problems: In expert mode, the pulldown "Parent" in the "Options" tab shows "- Select -". Once i select a parent and press Save, after the reload the pulldown still says "- Select -". However – when in normal mode, the correct parent is shown. But – again – this only applies to the french version - the english version works fine. |
Is it possible to provide a zip of your user Oder so we can try and recreate the problem? |
@rhukster - thanks so much for your support! |
Is the save problem occurring on some specific page, or on all pages? Also, which browser are you using? |
The save problem occurs in the french version on the page "À propos" > "Partenaires". I'm using the latest version of Chrome – however, i do have the exact same problem when using Firefox. And as i mentioned before in this thread – even when deleting the page "Partenaires" as well as its parent, and recreating them anew, the problem still presists (or rather resurfaces after a while)... |
Recreated, @w00fz I get |
Ok got how to fix it - the parent page was named @rhukster do we "force" modular pages to be called modular.md to work? |
There is nothing hardcoded in Grav's underpinnnings that a modular page has to be called Frankly this is something that needs to be improved. We really need some way for the theme to know which templates are modular. Probably the best place would be an array of modular template types in the theme's blueprints. If known provided, it defaults to just |
@flaviocopes - hmm, that is strange. I tried what you suggested but in a slightly different manner, in order not to break my automatic Github webhook (which would occur when manually renaming an .md on the server): I added Unfortunately on my end the problem still persists in exactly the same manner (in expert mode no save possible in french version and the "Parent" pulldown in "Options" tab always shows - Select - instead of actual parent). Did i miss anything or do anything wrong while renaming the files? |
I think i found the trigger for my problem: Whenever i set a slug for the french version of the modular parent page, saving its modular children when in Expert mode stops working. As soon as i remove the slug from the parent page, it's working again. There is - however - one strange workaround to this bug that makes it possible to save, even when the modular parent has a slug set:
Now the front-matter changes will be saved. However, the pulldown "loses" the parent value, and displays "- Select -" upon reload. Interestingly in Normal mode, "Advanced" tab, the parent pulldown displays the correct parent. |
Ok ultimately I found the issue is the parent having a custom slug. So the "Parent" select does not find the correct page to highlight, and it's not set. Hence the JS error that prevents to save. |
mentioning @w00fz as this is related to getgrav/grav-plugin-admin#606, page slug issue. It's not the same issue, but related to a page slug too |
@flaviocopes - thanks to your input regarding the page slug issue i think i found a possible solution: I first applied the proposed change getgrav/grav@02f863a [grav] to my beta-installation (version 04 at the time): Taking inspiration from your fix, i also edited the following files: changing
And then my problem had vanished, and i could easily save frontmatter in expert mode in both languages. Also, the parent pulldown in the options tab finally showed the correct setting. However - after i upgraded to beta version 05 (including updates for all plugins) it stopped working :(. I think it might have something to do with the new additional blueprint |
Yes in the latest beta, some blueprints were moved into Admin as they are admin-only. They're still in Grav core too for backwards compatibility with older Admin plugin versions. I have pushed another commit to both Admin and Grav core, can you check them out? |
yes, this does solve the initial save problem. however, something else just surfaced (with beta05): whenever i'm in the admin panel and either try to change the language or save the current page, i get logged out instantly and have to re-login. the last saved change is preserved though, so the rawRoute-fix does work. i'm not sure whether this has to do with my setup (are there new changes to the langswitcher plugin?) or my current language settings? |
Also: When i log in again (after being "thrown out") i get the "Invalid security token" error message... Edit: Ah, ok, you already discovered this bug |
Ah yes, it's something related to a recent change. |
Should now be fixed in Grav develop |
wahouu! thank you so much :-) |
i’m doing a multilang-site (en/fr) and i can edit the english version without problems. however, in the french version, as soon as i switch to expert mode, edit the frontmatter and try to save, there is simply no response from grav. no reload, no error, not even a message in the debug console… rather strange.
i tried deleting some pages and created them anew, but the problem persists. if you want to try out yourself, here is my user-directory: http://toctoc.peacock.uberspace.de/_zips/user.zip - try changing the about/partners in the english / french version... if there's anything else you need, let me know.
thank you!
The text was updated successfully, but these errors were encountered: