Closed mrlch closed 6 months ago
@mrlch Can you provide specific steps to reproduce this on a fresh vanilla installation? I tried enabling another language and allowing multilingual options on a content type, but it doesn't cause the same issue:
I wonder if you have a contrib module that's breaking some things @mrlch -- which contrib modules do you have enabled?
Today I've encountered the issue with the sidebar moved below the editor on a new multilingual site I'm building. To reproduce the issue, I've set up a fresh demo site, installed the same modules and used the same multilingual options. At first sight without luck, but then I found the thing which makes the difference: a path prefix like en
or de
.
If you have enabled URL language detection at admin/config/regional/language/detection/url
to use a path prefix for one or more languages, the path for adding a page will be something like de/node/add/page
. In this case, the sidebar moves below the editor.
To verify the difference, leave the default language without path prefix and add a page using the path node/add/page
. Now the sidebar should behave as expected.
When I compare the Create page form in the browser dev tools, it looks like the form with the sidebar issue is missing some styles from gin/dist/css/components/edit_form.css
. On a form where the sidebar moves below the editor, the CSS definitions around line 40, 103 and 117 are missing.
@mrlch and @laryn, I'm curious if you can confirm my findings from two weeks ago:
If you have enabled URL language detection at
admin/config/regional/language/detection/url
to use a path prefix for one or more languages, the path for adding a page will be something likede/node/add/page
. In this case, the sidebar moves below the editor.
@olafgrabienski I haven't had a chance to verify but it looks like helpful steps to test -- I'll let you know as soon as I'm able to give it a try.
@mrlch @olafgrabienski I've made a commit that should take care of this -- thanks for the report and the steps to reproduce! If the fix I've added doesn't solve it for you let me know, but it was all that was needed in my testing to make sure we didn't consider the language code as part of the URL when checking if we were editing a page.
@laryn I've tested the commit on one of my sites, and it fixes the issue for me. Thank you!
I reported in a previous issue that the sidebar is on some installations at the wrong place.
Now I know what causes the issue.
When I install a second language the sidebar moves down.
Editform with only one language installed![Bildschirmfoto 2023-09-13 um 17 14 39](https://github.com/backdrop-contrib/gin/assets/16351448/abf9b751-d43a-46e1-bc88-777484b226ee)
Adding second language![Bildschirmfoto 2023-09-13 um 17 15 02](https://github.com/backdrop-contrib/gin/assets/16351448/4fa7616a-b9be-4976-aaa4-0aceb6b731b0)
Sidebar at the wrong place![Bildschirmfoto 2023-09-13 um 17 15 22](https://github.com/backdrop-contrib/gin/assets/16351448/d9456bef-c678-4b92-8479-4e7c12f61f6d)
go back to one language![Bildschirmfoto 2023-09-13 um 17 19 22](https://github.com/backdrop-contrib/gin/assets/16351448/ea3dcfe0-fb0c-4c27-b6ed-fafafa45f48d)
Edit form is back at the right place![Bildschirmfoto 2023-09-13 um 17 20 57](https://github.com/backdrop-contrib/gin/assets/16351448/774fc1c6-5706-431c-b63d-87463fdb22b9)